<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl xe msxsl CM Form" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xe="http://www.CrossFactory.net/XmlEditor" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:ContentManager="http://www.CrossFactory.net/ContentManager/" xmlns:CM="http://www.CrossFactory.net/ContentManager/"  xmlns:Form="http://www.delete_to_Save.net/" >
  <xsl:output method="xml" version="1.0" omit-xml-declaration="yes" indent="no"/>

  <xsl:param name="xe:contentLanguage">en</xsl:param>
  <xsl:param name="xe:userLanguage">en</xsl:param>
  <xsl:param name="xe:xmlEditorPath"/>
  <xsl:param name="xe:xmlEditorAllowCopy">false</xsl:param>
  <xsl:param name="xe:xmlEditorXmlId"/>
  <xsl:param name="xe:documentProviderName"/>
  <xsl:param name="xe:editionMode">false</xsl:param>
  <xsl:param name="xe:labels"/>
  <xsl:param name="labels2"/>

  <xsl:param name="xe:contentXmlInfo"/>
  <xsl:param name="xe:contentXslInfo"/>
  <xsl:param name="xe:transformForEmail">false</xsl:param>
  <xsl:param name="xe:showSubmit"/>
  <xsl:param name="formValues"/>
  <xsl:param name="userIdent"/>

  <xsl:param name="applicationPath"/>
  <xsl:param name="currentDesign"/>
  <xsl:param name="hierarchy"/>
  <xsl:param name="currentStep"></xsl:param>
  <xsl:param name="viewingMode">false</xsl:param>

  <xsl:param name="xmlDocument"></xsl:param>
  <xsl:param name="xmlData"></xsl:param>
  <xsl:param name="filePath"></xsl:param>

  <xsl:template name="XmlEditorCancelClick">
    <xsl:param name="tooltip"/>
    <xsl:param name="action"/>
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true'">
        <xsl:attribute name="onclick">
          <xsl:text>CancelClick(</xsl:text>
          <xsl:if test="$action">
            <xsl:text>"</xsl:text>
            <xsl:value-of select="$action"/>
            <xsl:text>"</xsl:text>
          </xsl:if>
          <xsl:text>);</xsl:text>
        </xsl:attribute>
        <xsl:attribute name="title">
          <xsl:if test="$xe:labels">
            <xsl:value-of select="$xe:labels/label[name = 'ctrlClickTooltip']/*[name(.) = $xe:userLanguage]/text()"/>
          </xsl:if>
          <xsl:value-of select="$tooltip"/>
        </xsl:attribute>
        <xsl:if test="$tooltip">
          <xsl:attribute name="xe:tooltip">
            <xsl:value-of select="$tooltip"/>
          </xsl:attribute>
        </xsl:if>
      </xsl:when>
      <xsl:when test="$xe:editionMode = 'false'">
        <xsl:attribute name="title">
          <xsl:value-of select="$tooltip"/>
        </xsl:attribute>
        <xsl:if test="$action">
          <xsl:attribute name="onclick">
            <xsl:value-of select="$action"/>
          </xsl:attribute>
        </xsl:if>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

  <xsl:template name="XmlEditorInfo">
    <xsl:if test="$xe:editionMode = 'true'">
      <xsl:attribute name="xe_id">
        <xsl:value-of select="@xe:id"/>
      </xsl:attribute>
      <xsl:attribute name="xe_label">
        <xsl:value-of select="@xe:label"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="$xe:xmlEditorAllowCopy = 'true'">
      <xsl:attribute name="xecopy_id">
        <xsl:value-of select="@nodeId"/>
      </xsl:attribute>
      <xsl:attribute name="onmouseover">
        <xsl:text>HighlightForCopy();</xsl:text>
      </xsl:attribute>
      <xsl:attribute name="onmouseout">
        <xsl:text>UnHighlightForCopy();</xsl:text>
      </xsl:attribute>
      <xsl:attribute name="onclick">
        <xsl:text>CopyXml('</xsl:text>
        <xsl:value-of select="$xe:xmlEditorXmlId"/>
        <xsl:text>');</xsl:text>
      </xsl:attribute>
    </xsl:if>
  </xsl:template>

  <xsl:template name="XmlEditorStartTextBlock">
    <xsl:param name="allowEnter">no</xsl:param>
    <xsl:if test="$xe:editionMode = 'true'">
      <xsl:text disable-output-escaping="yes">&lt;</xsl:text>span id="xe_<xsl:value-of select="@xe:id"/>" xe_edit_id="<xsl:value-of select="@xe:id"/>" xe_tag="<xsl:value-of select="name(.)"/>" xe_allowEnter="<xsl:value-of select="$allowEnter"/>" xe_allowHtml="<xsl:value-of select="@xe:allowHtml"/>" xe_allowColoredChars="<xsl:value-of select="@xe:allowColoredChars"/>" xe_charsNumber="<xsl:value-of select="@xe:charsNumber"/>" xe_charsColor="<xsl:value-of select="@xe:charsColor"/>"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <xsl:template name="XmlEditorEndTextBlock">
    <xsl:if test="$xe:editionMode = 'true'">
      <xsl:text disable-output-escaping="yes">&lt;/span&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <xsl:template name="XmlEditorStartWebControlBlock">
    <xsl:text disable-output-escaping="yes">&lt;!--&lt;CM:WebControl  xmlns:CM="http://www.CrossFactory.net/ContentManager/"&gt;</xsl:text>
  </xsl:template>

  <xsl:template name="XmlEditorEndWebControlBlock">
    <xsl:text disable-output-escaping="yes">&lt;/CM:WebControl&gt;--&gt;</xsl:text>
  </xsl:template>

  <xsl:template name="XmlEditorStartServerControlBlock">
    <xsl:text disable-output-escaping="yes">&lt;!--&lt;CM:ServerControl  xmlns:CM="http://www.CrossFactory.net/ContentManager/"&gt;</xsl:text>
  </xsl:template>

  <xsl:template name="XmlEditorEndServerControlBlock">
    <xsl:text disable-output-escaping="yes">&lt;/CM:ServerControl&gt;--&gt;</xsl:text>
  </xsl:template>

  <xsl:template name="NameInputForm">
    <xsl:param name="name"></xsl:param>
    <xsl:param name="label"></xsl:param>
    <xsl:param name="pos"></xsl:param>
    <xsl:variable name="eltname">
      <xsl:choose>
        <xsl:when test="string-length($name) != 0">
          <xsl:value-of select="CM:ReplaceQuote($name)"/>
        </xsl:when>
        <xsl:when test="string-length($label) != 0">
          <xsl:value-of select="CM:ReplaceQuote($label)"/>
          <xsl:text>_</xsl:text>
          <xsl:value-of select="CM:GetCounter()"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>undefined_</xsl:text>
          <xsl:value-of select="CM:GetCounter()"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="tmp" select="CM:AddFormElementName(string($eltname))"/>
    <xsl:variable name="tmp1" select="CM:SetTextFieldName(string($tmp))"/>
    <xsl:value-of select="$eltname" />
  </xsl:template>

  <xsl:template name="NameInputFormStep">
    <xsl:param name="name"></xsl:param>
    <xsl:param name="label"></xsl:param>
    <xsl:param name="pos"></xsl:param>
    <xsl:variable name="eltname">
      <xsl:choose>
        <xsl:when test="string-length($name) != 0">
          <xsl:value-of select="CM:ReplaceQuote($name)"/>
        </xsl:when>
        <xsl:when test="string-length($label) != 0">
          <xsl:value-of select="CM:ReplaceQuote($label)"/>
          <xsl:text>_</xsl:text>
          <xsl:value-of select="CM:GetCounterStep()"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>undefined_</xsl:text>
          <xsl:value-of select="CM:GetCounterStep()"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="tmp" select="CM:AddFormElementName(string($eltname))"/>
    <xsl:variable name="tmp1" select="CM:SetTextFieldName(string($tmp))"/>
    <xsl:value-of select="$eltname" />
  </xsl:template>

  <xsl:template name="NameInputFormNoCounter">
    <xsl:param name="name"></xsl:param>
    <xsl:param name="label"></xsl:param>
    <xsl:param name="pos"></xsl:param>
    <xsl:param name="currentpos"></xsl:param>
    <xsl:variable name="eltname">
      <xsl:choose>
        <xsl:when test="string-length($name) != 0">
          <xsl:value-of select="CM:ReplaceQuote($name)"/>
        </xsl:when>
        <xsl:when test="string-length($label) != 0">
          <xsl:value-of select="CM:ReplaceQuote($label)"/><xsl:text>_</xsl:text><xsl:value-of select="$pos"/>_<xsl:value-of select="$currentpos"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>undefined_</xsl:text><xsl:value-of select="$pos"/>_<xsl:value-of select="$currentpos"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="tmp" select="CM:AddFormElementName(string($eltname))"/>
    <xsl:variable name="tmp1" select="CM:SetTextFieldName(string($tmp))"/>
    <xsl:value-of select="$eltname" />
  </xsl:template>
  <!--<xsl:for-each select="*"><xsl:value-of select="name()"/> : <xsl:value-of select="text()"/><br/></xsl:for-each>-->

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 	
	
	<xsl:template match="pagecontent">
		<div>
      <xsl:if test="$xe:editionMode = 'true'">
        <xsl:attribute name="style">padding-top:2px;padding-bottom:2px;</xsl:attribute>
      </xsl:if>
      <xsl:if test="$xe:editionMode = 'true'">
        <xsl:attribute name="style">padding:0px;margin:0px;</xsl:attribute>
      </xsl:if>
			<xsl:call-template name="XmlEditorInfo" />
			<xsl:apply-templates select="pagetitle"/>
			<xsl:apply-templates select="summary"/>
			<xsl:apply-templates select="section|spacer|horizontalline|pagepopup"/>
			<br/>
		</div>
	</xsl:template>-->


  <xsl:template match="pagecontent">
    <div>
      <xsl:if test="$xe:editionMode = 'true'">
        <xsl:attribute name="style">
          <xsl:text>padding-top:2px;padding-bottom:2px;</xsl:text>
        </xsl:attribute>
      </xsl:if>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="pagetitle"/>
      <xsl:apply-templates select="summary"/>
      <xsl:apply-templates select="section|tabcontainer|spacer|horizontalline|pagepopup"/>
      <div style="clear:both;height:1px;">
        <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
      </div>
    </div>
    <script language="javascript">
      ResizeAllTabContainer();
    </script>
  </xsl:template>


  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="tabcontainer">
    <xsl:variable name="posContainer">
      <xsl:value-of select="position()" />
    </xsl:variable>
    <div>
      <xsl:attribute name="id">
        <xsl:text>posContainer_</xsl:text>
        <xsl:value-of select="position()" />
      </xsl:attribute>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:attribute name="class">
        <xsl:text>SiteNOTE_TabbedSections</xsl:text>
      </xsl:attribute>
      <xsl:if test="class and string-length(class/text()) != 0">
        <xsl:attribute name="class">
          <xsl:value-of select="class/text()" />
        </xsl:attribute>
      </xsl:if>
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'false'">
          <xsl:if test="sectiondisplay">
            <input type="hidden">
              <xsl:attribute name="value">
                <xsl:value-of select="sectiondisplay/text()" />
              </xsl:attribute>
            </input>
          </xsl:if>
          <ul class="SiteNOTE_TabsContainer">
            <xsl:for-each select="sectiontab">
              <xsl:call-template name="MySectiontitleTag">
                <xsl:with-param name="posContainer">
                  <xsl:value-of select="$posContainer" />
                </xsl:with-param>
                <xsl:with-param name="pos">
                  <xsl:value-of select="position()" />
                </xsl:with-param>
              </xsl:call-template>
            </xsl:for-each>
          </ul>
        </xsl:when>
      </xsl:choose>

      <xsl:apply-templates select="sectiontab" >
        <xsl:with-param name="posContainer">
          <xsl:value-of select="$posContainer" />
        </xsl:with-param>
      </xsl:apply-templates>

    </div>
  </xsl:template>

  <xsl:template name="MySectiontitleTag">
    <xsl:param name="posContainer"></xsl:param>
    <xsl:param name="pos"></xsl:param>
    <xsl:choose>
      <xsl:when test="string-length(normaltabpicture/uri/text()) != 0">
        <li class="SiteNOTE_ImageTab">
          <xsl:choose>
            <xsl:when test="../sectiondisplay and ../sectiondisplay/text() = 'hoveronly'">
              <xsl:choose>
                <xsl:when test="hovertabpicture and string-length(hovertabpicture/uri/text()) != 0">
                  <xsl:attribute name="onmouseover">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);setImgSource(this,'</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="hovertabpicture/uri/text()" />
                    <xsl:text>','');showhide('section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="onmouseout">
                    <xsl:text>resetImgTab(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);setImgSource(this,'</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="normaltabpicture/uri/text()" />
                    <xsl:text>','');</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="onmouseover">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);showhide('section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="onmouseout">
                    <xsl:text>resetImgTab(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="../sectiondisplay and ../sectiondisplay/text() = 'selectedonly'">
              <xsl:if test="hovertabpicture and string-length(hovertabpicture/uri/text()) != 0">
                <xsl:attribute name="onmouseover">
                  <xsl:text>setImgSource(this,'</xsl:text>
                  <xsl:value-of select="$applicationPath" />
                  <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                  <xsl:value-of select="hovertabpicture/uri/text()" />
                  <xsl:text>','');</xsl:text>
                </xsl:attribute>
                <xsl:attribute name="onmouseout">
                  <xsl:text>setImgSource(this,'</xsl:text>
                  <xsl:value-of select="$applicationPath" />
                  <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                  <xsl:value-of select="normaltabpicture/uri/text()" />
                  <xsl:text>','');</xsl:text>
                </xsl:attribute>
              </xsl:if>
              <xsl:choose>
                <xsl:when test="selectedtabpicture and string-length(selectedtabpicture/uri/text()) != 0">
                  <xsl:attribute name="onclick">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);selectedImgTab(this,'posContainer_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>','section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');setImgSource(this,'</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="normaltabpicture/uri/text()" />
                    <xsl:text>','</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="selectedtabpicture/uri/text()" />
                    <xsl:text>');</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="onclick">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);selectedImgTab(this,'posContainer_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>','section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:choose>
                <xsl:when test="hovertabpicture and string-length(hovertabpicture/uri/text()) != 0">
                  <xsl:attribute name="onmouseover">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);showhide('section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');setImgSource(this,'</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="hovertabpicture/uri/text()" />
                    <xsl:text>','');</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="onmouseout">
                    <xsl:text>resetImgTab(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);setImgSource(this,'</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="normaltabpicture/uri/text()" />
                    <xsl:text>','');</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="onmouseover">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);showhide('section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="onmouseout">
                    <xsl:text>resetImgTab(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:choose>
                <xsl:when test="selectedtabpicture and string-length(selectedtabpicture/uri/text()) != 0">
                  <xsl:attribute name="onclick">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);selectedImgTab(this,'posContainer_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>','section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');setImgSource(this,'</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="normaltabpicture/uri/text()" />
                    <xsl:text>','</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="selectedtabpicture/uri/text()" />
                    <xsl:text>');</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="onclick">
                    <xsl:text>hideImg(this,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99);selectedImgTab(this,'posContainer_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>','section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_', 0,99,'section_</xsl:text>
                    <xsl:value-of select="$posContainer" />
                    <xsl:text>_</xsl:text>
                    <xsl:value-of select="position()" />
                    <xsl:text>');</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
          <input type="hidden">
            <xsl:attribute name="value">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="normaltabpicture/uri/text()" />
            </xsl:attribute>
          </input>
          <img ID="SiteNOTE_ImgTabTag">
            <xsl:attribute name="src">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="normaltabpicture/uri/text()" />
            </xsl:attribute>
            <xsl:if test="position() = 1 and ../sectiondisplay and ../sectiondisplay/text() = 'selectedonly'">
              <xsl:choose>
                <xsl:when test="selectedtabpicture and string-length(selectedtabpicture/uri/text()) != 0">
                  <xsl:attribute name="src">
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="selectedtabpicture/uri/text()" />
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="hovertabpicture and string-length(hovertabpicture/uri/text()) != 0">
                  <xsl:attribute name="src">
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="hovertabpicture/uri/text()" />
                  </xsl:attribute>
                </xsl:when>
              </xsl:choose>
            </xsl:if>
            <xsl:choose>
              <xsl:when test="../tabimgborder and ../tabimgborder/text() = 'no'">
                <xsl:attribute name="class">
                  <xsl:text>noborder</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="class">
                  <xsl:text>imageborder</xsl:text>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:if test="../tabimgheight and string-length(../tabimgheight/text()) != 0">
              <xsl:attribute name="height">
                <xsl:value-of select="../tabimgheight/text()" />
              </xsl:attribute>
            </xsl:if>
            <xsl:if test="../tabimgwidth and string-length(../tabimgwidth/text()) != 0">
              <xsl:attribute name="width">
                <xsl:value-of select="../tabimgwidth/text()"  />
              </xsl:attribute>
            </xsl:if>
            <xsl:if test="../tabimgtooltip and string-length(../tabimgtooltip/text()) != 0">
              <xsl:attribute name="alt">
                <xsl:value-of select="../tabimgtooltip/text()"  />
              </xsl:attribute>
            </xsl:if>
          </img>
        </li>
      </xsl:when>
      <xsl:otherwise>
        <li class="SiteNOTE_Tab">
          <xsl:choose>
            <xsl:when test="../sectiondisplay and ../sectiondisplay/text() = 'hoveronly'">
              <xsl:attribute name="onmouseover">
                <xsl:text>hide(this,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99);showhide('section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_</xsl:text>
                <xsl:value-of select="position()" />
                <xsl:text>');</xsl:text>
              </xsl:attribute>
              <xsl:attribute name="onmouseout">
                <xsl:text>resetTab(this,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99);</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="../sectiondisplay and ../sectiondisplay/text() = 'selectedonly'">
              <xsl:attribute name="onclick">
                <xsl:text>hide(this,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99);selectedTab(this,'posContainer_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>','section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_</xsl:text>
                <xsl:value-of select="position()" />
                <xsl:text>');</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="onmouseover">
                <xsl:text>hide(this,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99);showhide('section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_</xsl:text>
                <xsl:value-of select="position()" />
                <xsl:text>');</xsl:text>
              </xsl:attribute>
              <xsl:attribute name="onmouseout">
                <xsl:text>resetTab(this,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99);</xsl:text>
              </xsl:attribute>
              <xsl:attribute name="onclick">
                <xsl:text>hide(this,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99);selectedTab(this,'posContainer_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>','section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_', 0,99,'section_</xsl:text>
                <xsl:value-of select="$posContainer" />
                <xsl:text>_</xsl:text>
                <xsl:value-of select="position()" />
                <xsl:text>');</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:value-of select="sectiontitle" />
        </li>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>


  <xsl:template match="normaltabpicture">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <img>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:attribute name="src">
        <xsl:value-of select="$applicationPath" />
        <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
        <xsl:value-of select="uri"/>
      </xsl:attribute>
      <xsl:if test="../../tabimgheight and string-length(../../tabimgheight/text()) != 0">
        <xsl:attribute name="height">
          <xsl:value-of select="../../tabimgheight/text()" />
        </xsl:attribute>
      </xsl:if>
      <xsl:if test="../../tabimgwidth and string-length(../../tabimgwidth/text()) != 0">
        <xsl:attribute name="width">
          <xsl:value-of select="../../tabimgwidth/text()"  />
        </xsl:attribute>
      </xsl:if>
    </img>

  </xsl:template>

  <xsl:template match="hovertabpicture">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <img>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:attribute name="src">
        <xsl:value-of select="$applicationPath" />
        <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
        <xsl:value-of select="uri"/>
      </xsl:attribute>
      <xsl:if test="../../tabimgheight and string-length(../../tabimgheight/text()) != 0">
        <xsl:attribute name="height">
          <xsl:value-of select="../../tabimgheight/text()" />
        </xsl:attribute>
      </xsl:if>
      <xsl:if test="../../tabimgwidth and string-length(../tabimgwidth/text()) != 0">
        <xsl:attribute name="width">
          <xsl:value-of select="../../tabimgwidth/text()"  />
        </xsl:attribute>
      </xsl:if>
    </img>
  </xsl:template>

  <xsl:template match="selectedtabpicture">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <img>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:attribute name="src">
        <xsl:value-of select="$applicationPath" />
        <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
        <xsl:value-of select="uri"/>
      </xsl:attribute>
      <xsl:if test="../../tabimgheight and string-length(../../tabimgheight/text()) != 0">
        <xsl:attribute name="height">
          <xsl:value-of select="../../tabimgheight/text()" />
        </xsl:attribute>
      </xsl:if>
      <xsl:if test="../../tabimgwidth and string-length(../../tabimgwidth/text()) != 0">
        <xsl:attribute name="width">
          <xsl:value-of select="../../tabimgwidth/text()"  />
        </xsl:attribute>
      </xsl:if>
    </img>
  </xsl:template>

  <xsl:template match="sectiontab/sectiontitle">
    <h2>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'sectiontitle']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </h2>
  </xsl:template>

  <xsl:template match="sectiontab">
    <xsl:param name="posContainer"></xsl:param>
    <xsl:if test="$xe:editionMode = 'true'">
      <div>
        <span>
          <xsl:apply-templates select="normaltabpicture" />
        </span>
        <span style="margin-left:5px;">
          <xsl:apply-templates select="hovertabpicture" />
        </span>
        <span style="margin-left:5px;">
          <xsl:apply-templates select="selectedtabpicture" />
        </span>
      </div>
    </xsl:if>
    <div class="SiteNOTE_SectionsContainer">
      <xsl:attribute name="id">
        <xsl:text>section_</xsl:text>
        <xsl:value-of select="$posContainer" />
        <xsl:text>_</xsl:text>
        <xsl:value-of select="position()" />
      </xsl:attribute>
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true' or position() = 1">
          <xsl:attribute name="style">
            <xsl:text>display:</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="style">
            <xsl:text>display:</xsl:text>
          </xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
      <div>
        <xsl:if test="$xe:editionMode = 'true'">
          <xsl:attribute name="style">
            <xsl:text>padding-top:1px;padding-bottom:1px;</xsl:text>
          </xsl:attribute>
        </xsl:if>
        <xsl:choose>
          <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
            <xsl:attribute name="class">
              <xsl:text>section sectionColored sectionMargin</xsl:text>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
            <xsl:attribute name="class">
              <xsl:text>section sectionColored sectionIndent sectionMargin</xsl:text>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
            <xsl:attribute name="class">
              <xsl:text>section sectionIndent sectionMargin</xsl:text>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
            <xsl:attribute name="class">
              <xsl:text>section sectionMargin</xsl:text>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
            <xsl:attribute name="class">
              <xsl:text>section sectionColored</xsl:text>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
            <xsl:attribute name="class">
              <xsl:text>section sectionColored sectionIndent</xsl:text>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
            <xsl:attribute name="class">
              <xsl:text>section sectionIndent</xsl:text>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
            <xsl:attribute name="class">
              <xsl:text>section</xsl:text>
            </xsl:attribute>
          </xsl:when>
        </xsl:choose>
        <xsl:call-template name="XmlEditorInfo" />
        <xsl:apply-templates select="anchor" />
        <xsl:apply-templates select="sectiontitle"/>
        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
        <div style="clear:both;height:1px;">
          <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
        </div>
      </div>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="pagepopup">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, urlpage/text())"/>
    <xsl:if test="$xe:editionMode = 'true'">
      <table cellpadding="0" cellspacing="0" border="0" height="45">
        <xsl:call-template name="XmlEditorInfo" />
        <tr>
          <td width="100%" valign="middle" height="45">
            <img src="{$applicationPath}Images/Template/popup.gif" />
          </td>
        </tr>
      </table>
    </xsl:if>
    <xsl:if test="$xe:editionMode = 'false'">
      <script language="javascript">
        function openpopup()
        {
        window.open('<xsl:value-of select="$hr" />',null,'width=<xsl:value-of select="width" />,height=<xsl:value-of select="height" />,status=no,scroll=no,fullscreen=no,menubar=no');
        }
        setTimeout("openpopup()",2000);
      </script>

    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="pagetitle">
    <h1>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'pagetitle']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </h1>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="summary">
    <p class="summary">
      <xsl:attribute name="align">
        <xsl:value-of select="align/text()" />
      </xsl:attribute>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'summary']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </p>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="spacer">
    <div>
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <xsl:attribute name="style">
            <xsl:text>background-color:#EAEAEA</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:otherwise></xsl:otherwise>
      </xsl:choose>
      <xsl:call-template name="XmlEditorInfo"/>
      <img src="{$applicationPath}Images/Transp.gif" width="25">
        <xsl:attribute name="height">
          <xsl:choose>
            <xsl:when test="spacerheight/text()='twolines'">
              <xsl:text>20px</xsl:text>
            </xsl:when>
            <xsl:when test="spacerheight/text()='threelines'">
              <xsl:text>30px</xsl:text>
            </xsl:when>
            <xsl:when test="spacerheight/text()='fourlines'">
              <xsl:text>40px</xsl:text>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text>10px</xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
      </img>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="horizontalline">
    <table cellpadding="0" cellspacing="0" border="0" height="1" width="100%">
      <xsl:call-template name="XmlEditorInfo"/>
      <tr>
        <td height="5" width="3" >
          <img src="{$applicationPath}Images/Transp.gif" width="100%" height="5"/>
        </td>
      </tr>
      <tr>
        <td height="1" width="100%" align="center">
          <xsl:choose>
            <xsl:when test="../colored/text()='no'">
              <xsl:attribute name="class">
                <xsl:text>horizontalline</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="class">
                <xsl:text>horizontalline horizontallineColored</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
        </td>
      </tr>
      <tr>
        <td height="6" width="3">
          <img src="{$applicationPath}Images/Transp.gif" width="100%" height="6"/>
        </td>
      </tr>
    </table>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   SECTION     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="section">
    <div>
      <xsl:if test="$xe:editionMode = 'true'">
        <xsl:attribute name="style">
          <xsl:text>padding-top:1px;padding-bottom:1px;</xsl:text>
        </xsl:attribute>
      </xsl:if>
      <xsl:choose>
        <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>section sectionColored sectionMargin</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>section sectionColored sectionIndent sectionMargin</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>section sectionIndent sectionMargin</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>section sectionMargin</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>section sectionColored</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>section sectionColored sectionIndent</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>section sectionIndent</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>section</xsl:text>
          </xsl:attribute>
        </xsl:when>
      </xsl:choose>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="anchor" />
      <xsl:apply-templates select="sectiontitle"/>
      <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form|gallerycontent"/>
      <div style="clear:both;height:1px;">
        <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
      </div>
    </div>
  </xsl:template>


  <xsl:template match="sectioncontent">
    <div style="margin:0px;padding:0px;">
      <xsl:if test="$xe:editionMode = 'true'">
        <xsl:attribute name="style">padding-top:3px;padding-bottom:3px;</xsl:attribute>
      </xsl:if>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="section"/>
      <xsl:if test="count(section) = 0">
        <img src="{$applicationPath}Images/Transp.gif" width="50" height="50" />
      </xsl:if>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  <xsl:template match="bloc">
    <div>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:if test="$xe:editionMode = 'true'">
        <xsl:attribute name="style">padding-top:3px;padding-bottom:3px;</xsl:attribute>
      </xsl:if>
      <xsl:choose>
        <xsl:when test="wrap/text()='no' and hpos/text()='right'">
          <xsl:attribute name="class">alignright</xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='no' and hpos/text()='center'">
          <xsl:attribute name="class">aligncenter</xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='no' and hpos/text()='left'">
          <xsl:attribute name="class">alignleft</xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
          <xsl:attribute name="class">floatright</xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
          <xsl:attribute name="class">aligncenter</xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
          <xsl:attribute name="class">floatleft</xsl:attribute>
        </xsl:when>
      </xsl:choose>
      <div>
        <xsl:choose>
          <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
            <xsl:attribute name="style">width:<xsl:value-of select="width/text()" />px;height:<xsl:value-of select="height/text()" />px;</xsl:attribute>
          </xsl:when>
          <xsl:otherwise>
            <xsl:choose>
              <xsl:when test="string-length(width/text()) != 0">
                <xsl:attribute name="style">width:<xsl:value-of select="width/text()" />px;</xsl:attribute>
              </xsl:when>
              <xsl:when test="string-length(height/text()) != 0">
                <xsl:attribute name="style">height:<xsl:value-of select="height/text()" />px;</xsl:attribute>
              </xsl:when>
            </xsl:choose>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:choose>
          <xsl:when test="border/text()='yes'">
            <xsl:choose>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc blocColored blocMargin blocBorder</xsl:attribute>
              </xsl:when>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocColored blocIndent blocMargin blocBorder</xsl:attribute>
              </xsl:when>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocIndent blocMargin blocBorder</xsl:attribute>
              </xsl:when>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc blocMargin blocBorder</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc blocColored blocBorder</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocColored blocIndent blocBorder</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocIndent blocBorder</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc blocBorder</xsl:attribute>
              </xsl:when>
            </xsl:choose>
          </xsl:when>
          <xsl:otherwise>
            <xsl:choose>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc blocColored blocMargin</xsl:attribute>
              </xsl:when>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocColored blocIndent blocMargin</xsl:attribute>
              </xsl:when>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocIndent blocMargin</xsl:attribute>
              </xsl:when>
              <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc blocMargin</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc blocColored</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocColored blocIndent</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
                <xsl:attribute name="class">bloc blocIndent</xsl:attribute>
              </xsl:when>
              <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
                <xsl:attribute name="class">bloc</xsl:attribute>
              </xsl:when>
            </xsl:choose>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:apply-templates select="anchor" />
        <xsl:apply-templates select="sectiontitle"/>
        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
      </div>
    </div>
  </xsl:template>-->

  <!--<xsl:template match="bloc">
    <xsl:choose>
      <xsl:when test="class and string-length(class/text()) != 0">
        <div>
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:attribute name="class">
            <xsl:value-of select="class/text()" />
          </xsl:attribute>
          <xsl:if test="$xe:editionMode = 'true'">
            <xsl:attribute name="style">
              <xsl:text>padding-top:3px;padding-bottom:3px;padding-right:0px;</xsl:text>
            </xsl:attribute>
          </xsl:if>
          <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
          <xsl:apply-templates select="anchor" />
          <xsl:apply-templates select="sectiontitle"/>
          <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
          <div style="clear:both;height:1px;">
            <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
          </div>
        </div>
      </xsl:when>
      <xsl:when test="border">
        <table cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;">
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:if test="$xe:editionMode = 'true' and border/text()='no'">
            <xsl:attribute name="style">
              <xsl:text>padding-top:3px;padding-bottom:3px;</xsl:text>
            </xsl:attribute>
          </xsl:if>
          <xsl:choose>
            <xsl:when test="colored/text()='yes'">
              <xsl:choose>
                <xsl:when test="wrap/text()='no' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>alignright blocColored</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter blocColored</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>alignleft blocColored</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>floatright blocColored</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter blocColored</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>floatleft blocColored</xsl:text>
                  </xsl:attribute>
                </xsl:when>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:choose>
                <xsl:when test="wrap/text()='no' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>alignright</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>alignleft</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>floatright</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>floatleft</xsl:text>
                  </xsl:attribute>
                </xsl:when>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:choose>
            <xsl:when test="border/text()='all'">
              <tr>
                <td colspan="3" class="blocBorderTop">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
              </tr>
              <tr>
                <td class="blocBorderLeft">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
                <td>
                  <table cellpadding="0" cellspacing="0">
                    <xsl:choose>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                    </xsl:choose>
                    <xsl:choose>
                      <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                        <xsl:attribute name="style">
                          <xsl:text>width:</xsl:text>
                          <xsl:value-of select="width/text()" />
                          <xsl:text>px;height:</xsl:text>
                          <xsl:value-of select="height/text()" />
                          <xsl:text>px;</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:choose>
                          <xsl:when test="string-length(width/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>width:</xsl:text>
                              <xsl:value-of select="width/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                          <xsl:when test="string-length(height/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>height:</xsl:text>
                              <xsl:value-of select="height/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                        </xsl:choose>
                      </xsl:otherwise>
                    </xsl:choose>
                    <tr>
                      <td>
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                        <xsl:apply-templates select="anchor" />
                        <xsl:apply-templates select="sectiontitle"/>
                        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                        <div style="clear:both;height:1px;">
                          <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
                <td class="blocBorderRight">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
              </tr>
              <tr>
                <td colspan="3" class="blocBorderBottom">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
              </tr>
            </xsl:when>
            <xsl:when test="border/text()='top'">
              <tr>
                <td class="blocBorderTop">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
              </tr>
              <tr>
                <td>
                  <table cellpadding="0" cellspacing="0">
                    <xsl:choose>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                    </xsl:choose>
                    <xsl:choose>
                      <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                        <xsl:attribute name="style">
                          <xsl:text>width:</xsl:text>
                          <xsl:value-of select="width/text()" />
                          <xsl:text>px;height:</xsl:text>
                          <xsl:value-of select="height/text()" />
                          <xsl:text>px;</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:choose>
                          <xsl:when test="string-length(width/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>width:</xsl:text>
                              <xsl:value-of select="width/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                          <xsl:when test="string-length(height/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>height:</xsl:text>
                              <xsl:value-of select="height/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                        </xsl:choose>
                      </xsl:otherwise>
                    </xsl:choose>
                    <tr>
                      <td>
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                        <xsl:apply-templates select="anchor" />
                        <xsl:apply-templates select="sectiontitle"/>
                        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                        <div style="clear:both;height:1px;">
                          <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test="border/text()='right'">
              <tr>
                <td>
                  <table cellpadding="0" cellspacing="0">
                    <xsl:choose>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                    </xsl:choose>
                    <xsl:choose>
                      <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                        <xsl:attribute name="style">
                          <xsl:text>width:</xsl:text>
                          <xsl:value-of select="width/text()" />
                          <xsl:text>px;height:</xsl:text>
                          <xsl:value-of select="height/text()" />
                          <xsl:text>px;</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:choose>
                          <xsl:when test="string-length(width/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>width:</xsl:text>
                              <xsl:value-of select="width/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                          <xsl:when test="string-length(height/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>height:</xsl:text>
                              <xsl:value-of select="height/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                        </xsl:choose>
                      </xsl:otherwise>
                    </xsl:choose>
                    <tr>
                      <td>
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                        <xsl:apply-templates select="anchor" />
                        <xsl:apply-templates select="sectiontitle"/>
                        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                        <div style="clear:both;height:1px;">
                          <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
                <td class="blocBorderRight">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
              </tr>
            </xsl:when>
            <xsl:when test="border/text()='bottom'">
              <tr>
                <td>
                  <table cellpadding="0" cellspacing="0">
                    <xsl:choose>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                    </xsl:choose>
                    <xsl:choose>
                      <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                        <xsl:attribute name="style">
                          <xsl:text>width:</xsl:text>
                          <xsl:value-of select="width/text()" />
                          <xsl:text>px;height:</xsl:text>
                          <xsl:value-of select="height/text()" />
                          <xsl:text>px;</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:choose>
                          <xsl:when test="string-length(width/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>width:</xsl:text>
                              <xsl:value-of select="width/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                          <xsl:when test="string-length(height/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>height:</xsl:text>
                              <xsl:value-of select="height/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                        </xsl:choose>
                      </xsl:otherwise>
                    </xsl:choose>
                    <tr>
                      <td>
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                        <xsl:apply-templates select="anchor" />
                        <xsl:apply-templates select="sectiontitle"/>
                        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                        <div style="clear:both;height:1px;">
                          <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td class="blocBorderBottom">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
              </tr>
            </xsl:when>
            <xsl:when test="border/text()='left'">
              <tr>
                <td class="blocBorderLeft">
                  <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                </td>
                <td>
                  <table cellpadding="0" cellspacing="0">
                    <xsl:choose>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                    </xsl:choose>
                    <xsl:choose>
                      <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                        <xsl:attribute name="style">
                          <xsl:text>width:</xsl:text>
                          <xsl:value-of select="width/text()" />
                          <xsl:text>px;height:</xsl:text>
                          <xsl:value-of select="height/text()" />
                          <xsl:text>px;</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:choose>
                          <xsl:when test="string-length(width/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>width:</xsl:text>
                              <xsl:value-of select="width/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                          <xsl:when test="string-length(height/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>height:</xsl:text>
                              <xsl:value-of select="height/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                        </xsl:choose>
                      </xsl:otherwise>
                    </xsl:choose>
                    <tr>
                      <td>
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                        <xsl:apply-templates select="anchor" />
                        <xsl:apply-templates select="sectiontitle"/>
                        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                        <div style="clear:both;height:1px;">
                          <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </xsl:when>
            <xsl:otherwise>
              <tr>
                <td>
                  <table cellpadding="0" cellspacing="0">
                    <xsl:choose>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="(not(margin) or margin/text()='yes') and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent blocMargin</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='no'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:when test="margin/text()='no' and tabulation/text()='yes'">
                        <xsl:attribute name="class">
                          <xsl:text>bloc blocIndent</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                    </xsl:choose>
                    <xsl:choose>
                      <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                        <xsl:attribute name="style">
                          <xsl:text>width:</xsl:text>
                          <xsl:value-of select="width/text()" />
                          <xsl:text>px;height:</xsl:text>
                          <xsl:value-of select="height/text()" />
                          <xsl:text>px;</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:choose>
                          <xsl:when test="string-length(width/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>width:</xsl:text>
                              <xsl:value-of select="width/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                          <xsl:when test="string-length(height/text()) != 0">
                            <xsl:attribute name="style">
                              <xsl:text>height:</xsl:text>
                              <xsl:value-of select="height/text()" />
                              <xsl:text>px;</xsl:text>
                            </xsl:attribute>
                          </xsl:when>
                        </xsl:choose>
                      </xsl:otherwise>
                    </xsl:choose>
                    <tr>
                      <td>
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                        <xsl:apply-templates select="anchor" />
                        <xsl:apply-templates select="sectiontitle"/>
                        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                        <div style="clear:both;height:1px;">
                          <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </xsl:otherwise>
          </xsl:choose>
        </table>
      </xsl:when>
      <xsl:otherwise>
        <div>
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:if test="$xe:editionMode = 'true'">
            <xsl:attribute name="style">
              <xsl:text>padding-top:3px;padding-bottom:3px;</xsl:text>
            </xsl:attribute>
          </xsl:if>
          <xsl:choose>
            <xsl:when test="wrap/text()='no' and hpos/text()='right'">
              <xsl:attribute name="class">
                <xsl:text>alignright</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='no' and hpos/text()='center'">
              <xsl:attribute name="class">
                <xsl:text>aligncenter</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='no' and hpos/text()='left'">
              <xsl:attribute name="class">
                <xsl:text>alignleft</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
              <xsl:attribute name="class">
                <xsl:text>floatright</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
              <xsl:attribute name="class">
                <xsl:text>aligncenter</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
              <xsl:attribute name="class">
                <xsl:text>floatleft</xsl:text>
              </xsl:attribute>
            </xsl:when>
          </xsl:choose>
          <div>
            <xsl:choose>
              <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                <xsl:attribute name="style">
                  <xsl:text>width:</xsl:text>
                  <xsl:value-of select="width/text()" />
                  <xsl:text>px;height:</xsl:text>
                  <xsl:value-of select="height/text()" />
                  <xsl:text>px;</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:choose>
                  <xsl:when test="string-length(width/text()) != 0">
                    <xsl:attribute name="style">
                      <xsl:text>width:</xsl:text>
                      <xsl:value-of select="width/text()" />
                      <xsl:text>px;</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="string-length(height/text()) != 0">
                    <xsl:attribute name="style">
                      <xsl:text>height:</xsl:text>
                      <xsl:value-of select="height/text()" />
                      <xsl:text>px;</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                </xsl:choose>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:choose>
              <xsl:when test="border/text()='yes'">
                <xsl:choose>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                </xsl:choose>
              </xsl:when>
              <xsl:otherwise>
                <xsl:choose>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                </xsl:choose>
              </xsl:otherwise>
            </xsl:choose>
            <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
            <xsl:apply-templates select="anchor" />
            <xsl:apply-templates select="sectiontitle"/>
            <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
            <div style="clear:both;height:1px;">
              <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
            </div>
          </div>
        </div>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>-->

  <xsl:template match="bloc">
    <xsl:choose>
      <xsl:when test="class and string-length(class/text()) != 0">
        <div>
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:attribute name="class">
            <xsl:value-of select="class/text()" />
          </xsl:attribute>
          <xsl:if test="$xe:editionMode = 'true'">
            <xsl:attribute name="style">
              <xsl:text>padding-top:3px;padding-bottom:3px;padding-right:0px;</xsl:text>
            </xsl:attribute>
          </xsl:if>
          <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
          <xsl:apply-templates select="anchor" />
          <xsl:apply-templates select="sectiontitle"/>
          <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
          <div style="clear:both;height:1px;">
            <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
          </div>
        </div>
      </xsl:when>
      <xsl:when test="border">
        <table cellpadding="0" cellspacing="0">
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:if test="$xe:editionMode = 'true' and border/text()='no'">
            <xsl:attribute name="style">
              <xsl:text>padding-top:3px;padding-bottom:3px;</xsl:text>
            </xsl:attribute>
          </xsl:if>

          <xsl:choose>
            <xsl:when test="(not(margin) or margin/text()='yes')">
              <xsl:choose>
                <xsl:when test="wrap/text()='no' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>alignright blocMargin</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter blocMargin</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>alignleft blocMargin</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>floatright blocMargin</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter blocMargin</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>floatleft blocMargin</xsl:text>
                  </xsl:attribute>
                </xsl:when>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:choose>
                <xsl:when test="wrap/text()='no' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>alignright</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='no' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>alignleft</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
                  <xsl:attribute name="class">
                    <xsl:text>floatright</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
                  <xsl:attribute name="class">
                    <xsl:text>aligncenter</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
                  <xsl:attribute name="class">
                    <xsl:text>floatleft</xsl:text>
                  </xsl:attribute>
                </xsl:when>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
          <tr>
            <td>
              <table cellpadding="0" cellspacing="0">


                <xsl:choose>
                  <xsl:when test="border/text()='all'">
                    <tr>
                      <td colspan="3" class="blocBorderTop" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                    </tr>
                    <tr>
                      <td class="blocBorderLeft" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                      <td>
                        <table cellpadding="0" cellspacing="0">
                          <xsl:choose>
                            <xsl:when test="colored/text()='yes'">
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>

                          <xsl:choose>
                            <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                              <xsl:attribute name="style">
                                <xsl:text>width:</xsl:text>
                                <xsl:value-of select="width/text()" />
                                <xsl:text>px;height:</xsl:text>
                                <xsl:value-of select="height/text()" />
                                <xsl:text>px;</xsl:text>
                              </xsl:attribute>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="string-length(width/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>width:</xsl:text>
                                    <xsl:value-of select="width/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="string-length(height/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>height:</xsl:text>
                                    <xsl:value-of select="height/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <tr>
                            <td>
                              <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                              <xsl:apply-templates select="anchor" />
                              <xsl:apply-templates select="sectiontitle"/>
                              <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                              <div style="clear:both;height:1px;">
                                <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td class="blocBorderRight" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                    </tr>
                    <tr>
                      <td colspan="3" class="blocBorderBottom" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                    </tr>
                  </xsl:when>
                  <xsl:when test="border/text()='top'">
                    <tr>
                      <td class="blocBorderTop" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <table cellpadding="0" cellspacing="0">
                          <xsl:choose>
                            <xsl:when test="colored/text()='yes'">
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <xsl:choose>
                            <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                              <xsl:attribute name="style">
                                <xsl:text>width:</xsl:text>
                                <xsl:value-of select="width/text()" />
                                <xsl:text>px;height:</xsl:text>
                                <xsl:value-of select="height/text()" />
                                <xsl:text>px;</xsl:text>
                              </xsl:attribute>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="string-length(width/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>width:</xsl:text>
                                    <xsl:value-of select="width/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="string-length(height/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>height:</xsl:text>
                                    <xsl:value-of select="height/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <tr>
                            <td>
                              <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                              <xsl:apply-templates select="anchor" />
                              <xsl:apply-templates select="sectiontitle"/>
                              <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                              <div style="clear:both;height:1px;">
                                <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </xsl:when>
                  <xsl:when test="border/text()='right'">
                    <tr>
                      <td>
                        <table cellpadding="0" cellspacing="0">
                          <xsl:choose>
                            <xsl:when test="colored/text()='yes'">
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <xsl:choose>
                            <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                              <xsl:attribute name="style">
                                <xsl:text>width:</xsl:text>
                                <xsl:value-of select="width/text()" />
                                <xsl:text>px;height:</xsl:text>
                                <xsl:value-of select="height/text()" />
                                <xsl:text>px;</xsl:text>
                              </xsl:attribute>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="string-length(width/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>width:</xsl:text>
                                    <xsl:value-of select="width/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="string-length(height/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>height:</xsl:text>
                                    <xsl:value-of select="height/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <tr>
                            <td>
                              <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                              <xsl:apply-templates select="anchor" />
                              <xsl:apply-templates select="sectiontitle"/>
                              <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                              <div style="clear:both;height:1px;">
                                <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <td class="blocBorderRight" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                    </tr>
                  </xsl:when>
                  <xsl:when test="border/text()='bottom'">
                    <tr>
                      <td>
                        <table cellpadding="0" cellspacing="0">
                          <xsl:choose>
                            <xsl:when test="colored/text()='yes'">
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <xsl:choose>
                            <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                              <xsl:attribute name="style">
                                <xsl:text>width:</xsl:text>
                                <xsl:value-of select="width/text()" />
                                <xsl:text>px;height:</xsl:text>
                                <xsl:value-of select="height/text()" />
                                <xsl:text>px;</xsl:text>
                              </xsl:attribute>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="string-length(width/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>width:</xsl:text>
                                    <xsl:value-of select="width/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="string-length(height/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>height:</xsl:text>
                                    <xsl:value-of select="height/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <tr>
                            <td>
                              <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                              <xsl:apply-templates select="anchor" />
                              <xsl:apply-templates select="sectiontitle"/>
                              <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                              <div style="clear:both;height:1px;">
                                <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td class="blocBorderBottom" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                    </tr>
                  </xsl:when>
                  <xsl:when test="border/text()='left'">
                    <tr>
                      <td class="blocBorderLeft" style="margin:0px;padding:0px;border:0px">
                        <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                      </td>
                      <td>
                        <table cellpadding="0" cellspacing="0">
                          <xsl:choose>
                            <xsl:when test="colored/text()='yes'">
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <xsl:choose>
                            <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                              <xsl:attribute name="style">
                                <xsl:text>width:</xsl:text>
                                <xsl:value-of select="width/text()" />
                                <xsl:text>px;height:</xsl:text>
                                <xsl:value-of select="height/text()" />
                                <xsl:text>px;</xsl:text>
                              </xsl:attribute>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="string-length(width/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>width:</xsl:text>
                                    <xsl:value-of select="width/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="string-length(height/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>height:</xsl:text>
                                    <xsl:value-of select="height/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <tr>
                            <td>
                              <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                              <xsl:apply-templates select="anchor" />
                              <xsl:apply-templates select="sectiontitle"/>
                              <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                              <div style="clear:both;height:1px;">
                                <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </xsl:when>
                  <xsl:otherwise>
                    <tr>
                      <td>
                        <table cellpadding="0" cellspacing="0">
                          <xsl:choose>
                            <xsl:when test="colored/text()='yes'">
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocColored blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="tabulation/text()='no'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="tabulation/text()='yes'">
                                  <xsl:attribute name="class">
                                    <xsl:text>bloc blocIndent</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <xsl:choose>
                            <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                              <xsl:attribute name="style">
                                <xsl:text>width:</xsl:text>
                                <xsl:value-of select="width/text()" />
                                <xsl:text>px;height:</xsl:text>
                                <xsl:value-of select="height/text()" />
                                <xsl:text>px;</xsl:text>
                              </xsl:attribute>
                            </xsl:when>
                            <xsl:otherwise>
                              <xsl:choose>
                                <xsl:when test="string-length(width/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>width:</xsl:text>
                                    <xsl:value-of select="width/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                                <xsl:when test="string-length(height/text()) != 0">
                                  <xsl:attribute name="style">
                                    <xsl:text>height:</xsl:text>
                                    <xsl:value-of select="height/text()" />
                                    <xsl:text>px;</xsl:text>
                                  </xsl:attribute>
                                </xsl:when>
                              </xsl:choose>
                            </xsl:otherwise>
                          </xsl:choose>
                          <tr>
                            <td>
                              <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
                              <xsl:apply-templates select="anchor" />
                              <xsl:apply-templates select="sectiontitle"/>
                              <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
                              <div style="clear:both;height:1px;">
                                <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </xsl:otherwise>
                </xsl:choose>
              </table>
            </td>
          </tr>
        </table>
      </xsl:when>
      <xsl:otherwise>
        <div>
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:if test="$xe:editionMode = 'true'">
            <xsl:attribute name="style">
              <xsl:text>padding-top:3px;padding-bottom:3px;</xsl:text>
            </xsl:attribute>
          </xsl:if>
          <xsl:choose>
            <xsl:when test="wrap/text()='no' and hpos/text()='right'">
              <xsl:attribute name="class">
                <xsl:text>alignright</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='no' and hpos/text()='center'">
              <xsl:attribute name="class">
                <xsl:text>aligncenter</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='no' and hpos/text()='left'">
              <xsl:attribute name="class">
                <xsl:text>alignleft</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
              <xsl:attribute name="class">
                <xsl:text>floatright</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
              <xsl:attribute name="class">
                <xsl:text>aligncenter</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
              <xsl:attribute name="class">
                <xsl:text>floatleft</xsl:text>
              </xsl:attribute>
            </xsl:when>
          </xsl:choose>
          <div>
            <xsl:choose>
              <xsl:when test="string-length(width/text()) != 0 and string-length(height/text()) != 0">
                <xsl:attribute name="style">
                  <xsl:text>width:</xsl:text>
                  <xsl:value-of select="width/text()" />
                  <xsl:text>px;height:</xsl:text>
                  <xsl:value-of select="height/text()" />
                  <xsl:text>px;</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:choose>
                  <xsl:when test="string-length(width/text()) != 0">
                    <xsl:attribute name="style">
                      <xsl:text>width:</xsl:text>
                      <xsl:value-of select="width/text()" />
                      <xsl:text>px;</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="string-length(height/text()) != 0">
                    <xsl:attribute name="style">
                      <xsl:text>height:</xsl:text>
                      <xsl:value-of select="height/text()" />
                      <xsl:text>px;</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                </xsl:choose>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:choose>
              <xsl:when test="border/text()='yes'">
                <xsl:choose>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocMargin blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocBorder</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                </xsl:choose>
              </xsl:when>
              <xsl:otherwise>
                <xsl:choose>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="(not(margin) or margin/text()='yes') and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocMargin</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='yes' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocColored blocIndent</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='yes'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc blocIndent</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:when test="margin/text()='no' and colored/text()='no' and tabulation/text()='no'">
                    <xsl:attribute name="class">
                      <xsl:text>bloc</xsl:text>
                    </xsl:attribute>
                  </xsl:when>
                </xsl:choose>
              </xsl:otherwise>
            </xsl:choose>
            <img src="{$applicationPath}Images/Transp.gif" width="1" height="1" />
            <xsl:apply-templates select="anchor" />
            <xsl:apply-templates select="sectiontitle"/>
            <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|form"/>
            <div style="clear:both;height:1px;">
              <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
            </div>
          </div>
        </div>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="sectiontitle">
    <h2>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" /><xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'sectiontitle']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if><xsl:apply-templates /><xsl:call-template name="XmlEditorEndTextBlock" />
    </h2>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="section[colored/text()='yes']/sectiontitle|sectionform[colored/text()='yes']/sectiontitle|subsectionform[colored/text()='yes']/sectiontitle">
    <h2 class="coloredSectionTitle">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'sectiontitle']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </h2>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="section/subtitle|column/subtitle|sectionform/subtitle|subsectionform/subtitle|bloc/subtitle">
    <h3>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'subtitle']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </h3>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="paragraph">
    <p>
      <xsl:choose>
        <xsl:when test="spacing/text()='yes' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>paragraph paragraphSpacing</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="spacing/text()='yes' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>paragraph paragraphSpacing paragraphIndent</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="spacing/text()='no' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>paragraph</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="spacing/text()='no' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>paragraph paragraphIndent</xsl:text>
          </xsl:attribute>
        </xsl:when>
      </xsl:choose>
      <xsl:attribute name="style">
        <xsl:text>text-align:</xsl:text>
        <xsl:value-of select="alignment/text()" />
        <xsl:text>;</xsl:text>
      </xsl:attribute>
      <!-- lien à la suite d'un paragraphe -->
      <xsl:if test="(preceding-sibling::*[1] and name(preceding-sibling::*[1]) = 'file' and preceding-sibling::*[1]/wrap and preceding-sibling::*[1]/wrap/text()='yes') or (following-sibling::*[1] and name(following-sibling::*[1]) = 'file' and following-sibling::*[1]/wrap and following-sibling::*[1]/wrap/text()='yes')">
        <xsl:attribute name="style">
          <xsl:text>text-align:</xsl:text>
          <xsl:value-of select="alignment/text()" />
          <xsl:text>;display:inline;</xsl:text>
        </xsl:attribute>
      </xsl:if>
      <!-- end -->
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="data" />
    </p>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="data">
    <xsl:call-template name="XmlEditorStartTextBlock">
      <xsl:with-param name="allowEnter">yes</xsl:with-param>
    </xsl:call-template>
    <xsl:choose>
      <xsl:when test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'paragraph']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:if test="string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
          <img border="0" src="{$applicationPath}Images/Transp.gif" width="1" height="1" style="display:none" />
        </xsl:if>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template name="string-replace-all">
      <xsl:param name="text"/>
      <xsl:param name="replace"/>
      <xsl:param name="by"/>
      <xsl:choose>
          <xsl:when test="contains($text, $replace)">
              <xsl:value-of select="substring-before($text, $replace)" disable-output-escaping="yes" />
              <xsl:value-of select="$by" disable-output-escaping="yes"/>
              <xsl:call-template name="string-replace-all">
                  <xsl:with-param name="text" select="substring-after($text, $replace)" />
                  <xsl:with-param name="replace" select="$replace" />
                  <xsl:with-param name="by" select="$by" />
              </xsl:call-template>
          </xsl:when>
          <xsl:otherwise>
              <xsl:value-of select="$text" disable-output-escaping="yes"/>
          </xsl:otherwise>
      </xsl:choose>
  </xsl:template>

  <xsl:template match="html">
    <div class="FreeStyleContent">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock">
        <xsl:with-param name="allowEnter">yes</xsl:with-param>
      </xsl:call-template>
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'htmlcontent']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:call-template name="string-replace-all">
      	<xsl:with-param name="text" select="."/>
      	<xsl:with-param name="replace" select="'{$files-path}'"/>
      	<xsl:with-param name="by" select="$filePath" />
      </xsl:call-template>
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="stylerule">
    <span>
      <xsl:attribute name="class">
        <xsl:value-of select="rulestyle" />
      </xsl:attribute>
      <xsl:apply-templates />
    </span>
  </xsl:template>

  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

	<xsl:template match="linkmore">
		<xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
		<table border="0" cellpadding="0" cellspacing="3" width="100%" height="12">
			<tr>
				<td class="linkmore" width="100%" valign="top" align="right">
					<a>
						<xsl:call-template name="XmlEditorCancelClick">
							<xsl:with-param name="tooltip"><xsl:value-of select="tooltip/text()" /></xsl:with-param>
						</xsl:call-template>
						<xsl:choose>
							<xsl:when test="linkanchor[string-length(text()) != 0]">
                <xsl:choose>
                  <xsl:when test="$hr != ''">
								    <xsl:attribute name="href"><xsl:value-of select="$hr"/>#<xsl:value-of select="linkanchor/text()"/></xsl:attribute>
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:attribute name="href">
                      <xsl:value-of select="href/text()"/>#<xsl:value-of select="linkanchor/text()"/>
                    </xsl:attribute>
                  </xsl:otherwise>
                </xsl:choose>
							</xsl:when>
							<xsl:otherwise>
                <xsl:choose>
                  <xsl:when test="$hr != ''">
								    <xsl:attribute name="href"><xsl:value-of select="$hr"/></xsl:attribute>
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:attribute name="href">
                      <xsl:value-of select="href/text()"/>
                    </xsl:attribute>
                  </xsl:otherwise>
                </xsl:choose>
							</xsl:otherwise>
						</xsl:choose>
						<xsl:attribute name="target">
							<xsl:value-of select="target" />
						</xsl:attribute>
						<xsl:call-template name="XmlEditorInfo"/>
						More
					</a>
				</td>
			</tr>
		</table>
	</xsl:template>-->

  <xsl:template match="linkmore">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <div class="moreLink">
      <a>
        <xsl:call-template name="XmlEditorCancelClick">
          <xsl:with-param name="tooltip">
            <xsl:value-of select="tooltip/text()" />
          </xsl:with-param>
        </xsl:call-template>
        <xsl:choose>
          <xsl:when test="linkanchor[string-length(text()) != 0]">
            <xsl:choose>
              <xsl:when test="$hr != ''">
                <xsl:attribute name="href">
                  <xsl:value-of select="$hr"/>
                  <xsl:text>#</xsl:text>
                  <xsl:value-of select="linkanchor/text()"/>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="href">
                  <xsl:value-of select="href/text()"/>
                  <xsl:text>#</xsl:text>
                  <xsl:value-of select="linkanchor/text()"/>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:when>
          <xsl:otherwise>
			<xsl:choose>
				<xsl:when test="target/text() = '_blank'">
					  <xsl:attribute name="target">
						<xsl:value-of select="target" />
					  </xsl:attribute>
				</xsl:when>
			</xsl:choose>
            <xsl:choose>
              <xsl:when test="$hr != ''">
                <xsl:attribute name="href">
                  <xsl:value-of select="$hr"/>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="href">
                  <xsl:value-of select="href/text()"/>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:call-template name="XmlEditorInfo"/>
        <xsl:text>More</xsl:text>
      </a>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="picture">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <div>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="wrap/text()='no' and hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>alignright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='no' and hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>aligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='no' and hpos/text()='left'">
          <xsl:attribute name="class">
            <xsl:text>alignleft</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='yes' and hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>floatright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='yes' and hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>aligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="wrap/text()='yes' and hpos/text()='left'">
          <xsl:attribute name="class">
            <xsl:text>floatleft</xsl:text>
          </xsl:attribute>
        </xsl:when>
      </xsl:choose>
      <xsl:if test="string-length(linkanchor/text()) != 0">
        <a>
          <xsl:attribute name="name">
            <xsl:value-of select="linkanchor/text()"/>
          </xsl:attribute>
          <img border="0" src="{$applicationPath}Images/Transp.gif" width="1" height="1" style="display:none" />
        </a>
      </xsl:if>
      <xsl:choose>
        <xsl:when test="string-length(href/text()) != 0 or string-length(linkuri/text()) != 0">
          <a>
            <xsl:choose>
              <xsl:when test="string-length(href/text()) != 0">
                <xsl:call-template name="XmlEditorCancelClick">
                  <xsl:with-param name="tooltip">
                    <xsl:value-of select="tooltip/text()" />
                  </xsl:with-param>
                </xsl:call-template>
                <xsl:choose>
                  <xsl:when test="linkanchor[string-length(text()) != 0]">
                    <xsl:attribute name="href">
                      <xsl:value-of select="$hr"/>
                      <xsl:text>#</xsl:text>
                      <xsl:value-of select="linkanchor/text()"/>
                    </xsl:attribute>
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:attribute name="href">
                      <xsl:value-of select="$hr"/>
                    </xsl:attribute>
                  </xsl:otherwise>
                </xsl:choose>
                <xsl:attribute name="target">
                  <xsl:value-of select="target" />
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:if test="string-length(linkuri/text()) != 0">
                  <xsl:call-template name="XmlEditorCancelClick">
                    <xsl:with-param name="tooltip">
                      <xsl:value-of select="tooltip/text()" />
                    </xsl:with-param>
                  </xsl:call-template>
                  <xsl:attribute name="href">
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                    <xsl:value-of select="linkuri" />
                  </xsl:attribute>
                  <xsl:attribute name="target">
                    <xsl:value-of select="target" />
                  </xsl:attribute>
                </xsl:if>
              </xsl:otherwise>
            </xsl:choose>
            <img>
              <xsl:choose>
                <xsl:when test="border/text()='no'">
                  <xsl:attribute name="class">
                    <xsl:text>noborder</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>imageborder</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:attribute name="src">
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                <xsl:value-of select="uri"/>
              </xsl:attribute>
              <xsl:if test="string-length(height/text()) != 0">
                <xsl:attribute name="height">
                  <xsl:value-of select="height/text()" />
                </xsl:attribute>
              </xsl:if>
              <xsl:if test="string-length(width/text()) != 0">
                <xsl:attribute name="width">
                  <xsl:value-of select="width/text()"  />
                </xsl:attribute>
              </xsl:if>
              <xsl:if test="string-length(tooltip/text()) != 0">
                <xsl:attribute name="alt">
                  <xsl:value-of select="tooltip/text()"  />
                </xsl:attribute>
              </xsl:if>
              <xsl:if test="overuri">
                <xsl:attribute name="onmouseover">
                  <xsl:text>this.src='</xsl:text>
                  <xsl:value-of select="$applicationPath" />
                  <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                  <xsl:value-of select="overuri"/>
                  <xsl:text>';</xsl:text>
                </xsl:attribute>
                <xsl:attribute name="onmouseout">
                  <xsl:text>this.src='</xsl:text>
                  <xsl:value-of select="$applicationPath" />
                  <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                  <xsl:value-of select="uri"/>
                  <xsl:text>';</xsl:text>
                </xsl:attribute>
              </xsl:if>
            </img>
          </a>
        </xsl:when>
        <xsl:otherwise>
          <img>
            <xsl:choose>
              <xsl:when test="border/text()='no'">
                <xsl:attribute name="class">
                  <xsl:text>noborder</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="class">
                  <xsl:text>imageborder</xsl:text>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:attribute name="src">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="uri"/>
            </xsl:attribute>
            <xsl:if test="string-length(height/text()) != 0">
              <xsl:attribute name="height">
                <xsl:value-of select="height/text()" />
              </xsl:attribute>
            </xsl:if>
            <xsl:if test="string-length(width/text()) != 0">
              <xsl:attribute name="width">
                <xsl:value-of select="width/text()"  />
              </xsl:attribute>
            </xsl:if>
            <xsl:if test="string-length(tooltip/text()) != 0">
              <xsl:attribute name="alt">
                <xsl:value-of select="tooltip/text()"  />
              </xsl:attribute>
            </xsl:if>
            <xsl:if test="overuri">
              <xsl:attribute name="onmouseover">
                <xsl:text>this.src='</xsl:text>
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                <xsl:value-of select="overuri"/>
                <xsl:text>';</xsl:text>
              </xsl:attribute>
              <xsl:attribute name="onmouseout">
                <xsl:text>this.src='</xsl:text>
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                <xsl:value-of select="uri"/>
                <xsl:text>';</xsl:text>
              </xsl:attribute>
            </xsl:if>
          </img>
        </xsl:otherwise>
      </xsl:choose>


    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   GALLERY     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 	

	<xsl:template match="gallerycontent">
    <xsl:variable name="flashId"><xsl:value-of select="CM:RandomId()"/></xsl:variable>
		<table class="galleryContent" border="0" cellpadding="0" cellspacing="0" valign="top">
		<xsl:call-template name="XmlEditorInfo" />
			<tr>
				<td>
					<img src="{$applicationPath}Images/Transp.gif" width="100%" height="3" />
				</td>
			</tr>
			<tr>
				<td width="100%">
					<xsl:choose>
						<xsl:when test="$xe:editionMode = 'true'">
              <xsl:attribute name="height">20px</xsl:attribute>
							<xsl:apply-templates select="picturegallery"/>
						</xsl:when>
						<xsl:when test="$xe:editionMode = 'false'">
							<div>
                <xsl:attribute name="id">
                  <xsl:value-of select="$flashId" />
                </xsl:attribute>
                SimpleViewer requires Macromedia Flash. <a href="http://www.macromedia.com/go/getflashplayer/">Get Macromedia Flash.</a> If you have Flash installed, <a href="index.html?detectflash=false">click to view gallery</a>.
              </div>
							<script type="text/javascript">
									var fo = new SWFObject("<xsl:value-of select="$applicationPath" />_SiteNote/WWW/Flash/gallery.swf?xmlDataPath=<xsl:value-of select="$applicationPath" />_SiteNote/WWW/GetXml.aspx?uri=<xsl:value-of select="$xmlDocument" />", "sitenotegallery", "<xsl:value-of select="width" />", "<xsl:value-of select="height" />", "7", "<xsl:value-of select="bgColor" />");	
									//fo.addParam("xmlDataPath", "<xsl:value-of select="$applicationPath" />_SiteNote/WWW/GetXml.aspx?uri=<xsl:value-of select="$xmlDocument" />");
                fo.addParam("wmode","opaque");
                fo.write("<xsl:value-of select="$flashId" />");
              </script>
						</xsl:when>
					</xsl:choose>
				</td>
			</tr>
		</table>
	</xsl:template>-->

  <xsl:template match="gallerycontent">
    <xsl:variable name="flashId">
      <xsl:value-of select="CM:RandomId()"/>
    </xsl:variable>
    <div class="galleryContent">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <img src="{$applicationPath}Images/Transp.gif" width="100px" height="15px" />
          <xsl:apply-templates select="picturegallery"/>
        </xsl:when>
        <xsl:when test="$xe:editionMode = 'false'">
          <div>
            <xsl:attribute name="id">
              <xsl:value-of select="$flashId" />
            </xsl:attribute>
            SimpleViewer requires Macromedia Flash. <a href="http://www.macromedia.com/go/getflashplayer/">Get Macromedia Flash.</a>.
          </div>
          <script type="text/javascript">
            var fo = new SWFObject("<xsl:value-of select="$applicationPath" />_SiteNote/WWW/Flash/gallery.swf?xmlDataPath=<xsl:value-of select="$applicationPath" />_SiteNote/WWW/GetXml.aspx?uri=<xsl:value-of select="$xmlDocument" />", "sitenotegallery", "<xsl:value-of select="width" />", "<xsl:value-of select="height" />", "7", "<xsl:value-of select="bgColor" />");
            //fo.addParam("xmlDataPath", "<xsl:value-of select="$applicationPath" />_SiteNote/WWW/GetXml.aspx?uri=<xsl:value-of select="$xmlDocument" />");
            fo.addParam("wmode","opaque");

            fo.write("<xsl:value-of select="$flashId" />");
          </script>
        </xsl:when>
      </xsl:choose>
    </div>
  </xsl:template>

  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="picturegallery">
    <table>
      <tr>
        <td>
          <xsl:call-template name="XmlEditorInfo" />
          <img border="0" width="100">
            <xsl:attribute name="src">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="uri"/>
            </xsl:attribute>
          </img>
        </td>
        <td>
          <xsl:apply-templates select="tooltip" />
        </td>
      </tr>
    </table>
  </xsl:template>

  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="picturegallery/tooltip">
    <xsl:call-template name="XmlEditorInfo" />
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
      <xsl:value-of select="$xe:labels/label[name = 'value']/*[name(.) = $xe:userLanguage]/text()"/>
    </xsl:if>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>


  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   XXXXXXX     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->


  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="video">
    <div>
      <xsl:choose>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='left'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignleft</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsfloatright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="class">
            <xsl:text>vfsfloatleft</xsl:text>
          </xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
      <div>
        <xsl:choose>
          <xsl:when test="$xe:editionMode = 'false'">
            <EMBED TYPE="application/x-mplayer2" controls="controlpanel" ShowStatusBar="0" >
              <xsl:choose>
                <xsl:when test="border/text()='no'">
                  <xsl:attribute name="class">
                    <xsl:text>noborder</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>videoborder</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:choose>
                <xsl:when test="autostart/text()='no'">
                  <xsl:attribute name="AutoStart">
                    <xsl:text>false</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="AutoStart">
                    <xsl:text>true</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:choose>
                <xsl:when test="showcontrols/text()='no'">
                  <xsl:attribute name="ShowControls">
                    <xsl:text>false</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="ShowControls">
                    <xsl:text>true</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:choose>
                <xsl:when test="showstatusbar/text()='no'">
                  <xsl:attribute name="ShowStatusBar">
                    <xsl:text>false</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="ShowStatusBar">
                    <xsl:text>true</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:choose>
                <xsl:when test="showdisplay/text()='no'">
                  <xsl:attribute name="ShowDisplay">
                    <xsl:text>false</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="ShowDisplay">
                    <xsl:text>true</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:attribute name="src">
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                <xsl:value-of select="videouri"/>
              </xsl:attribute>
              <xsl:if test="width/text() != ''">
                <xsl:attribute name="width">
                  <xsl:apply-templates select="width"/>
                </xsl:attribute>
              </xsl:if>
              <xsl:if test="height/text() != ''">
                <xsl:attribute name="height">
                  <xsl:apply-templates select="height"/>
                </xsl:attribute>
              </xsl:if>
            </EMBED>
            <NOEMBED>
              <p class="txtlist">
                <xsl:if test="$xe:labels">
                  <xsl:value-of select="$xe:labels/label[name = 'novideobrowsemode']/*[name(.) = $xe:userLanguage]/text()"/>
                </xsl:if>
              </p>
            </NOEMBED>
          </xsl:when>
          <xsl:otherwise>
            <table>
              <xsl:attribute name="style">
                <xsl:text>background-image:url('</xsl:text>
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/Admin/Images/videologo.jpg');background-repeat:no-repeat;background-position:center;</xsl:text>
              </xsl:attribute>
              <xsl:choose>
                <xsl:when test="border/text()='no'">
                  <xsl:attribute name="class">
                    <xsl:text>noborder</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>videoborder</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:attribute name="width">
                <xsl:apply-templates select="width"/>
              </xsl:attribute>
              <xsl:attribute name="height">
                <xsl:apply-templates select="height"/>
              </xsl:attribute>
              <tr>
                <td>
                  <xsl:call-template name="XmlEditorInfo" />
                  <p class="txtlist">
                    <xsl:if test="$xe:labels">
                      <xsl:value-of select="$xe:labels/label[name = 'novideobrowsemode']/*[name(.) = $xe:userLanguage]/text()"/>
                    </xsl:if>
                  </p>
                </td>
              </tr>
            </table>
          </xsl:otherwise>
        </xsl:choose>
      </div>
    </div>
  </xsl:template>

  <!-- for this object don't forget to:
        - add a reference to _SiteNote/Admin/Silverlight.js in the .master page
        - add the MinoPlayer(_Ver1_2).xap file in the flash folder of the website
  -->
  <xsl:template match="silverlight">
    <xsl:variable name="silverlightId">
      <xsl:value-of select="CM:RandomId()"/>
    </xsl:variable>
    <div>
      <xsl:choose>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='left'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignleft</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsfloatright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="class">
            <xsl:text>vfsfloatleft</xsl:text>
          </xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
      <div>
        <xsl:attribute name="id">
          <xsl:value-of select="$silverlightId" />
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="$xe:editionMode = 'false'">
            <xsl:variable name="width">
              <xsl:choose>
                <xsl:when test="string-length(width/text()) != 0" >
                  <xsl:apply-templates select="width"/>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>230</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:variable>
            <xsl:variable name="height">
              <xsl:choose>
                <xsl:when test="string-length(height/text()) != 0" >
                  <xsl:apply-templates select="height"/>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>200</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:variable>
            <xsl:variable name="background">
              <xsl:choose>
                <xsl:when test="string-length(background/text()) != 0" >
                  <xsl:apply-templates select="background"/>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>black</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:variable>
            <xsl:variable name="autostart">
              <xsl:choose>
                <xsl:when test="autostart/text()='no'" >
                  <xsl:text>false</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>true</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:variable>
            <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
              <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
            </a>
            <script language="javascript" type="text/javascript">
              WriteSilverlight("<xsl:value-of select="$silverlightId" />","<xsl:value-of select="fileuri"/>","<xsl:value-of select="$applicationPath" />","<xsl:value-of select="$width" />","<xsl:value-of select="$height" />","<xsl:value-of select="$autostart" />","<xsl:value-of select="$background" />");
            </script>
          </xsl:when>
          <xsl:otherwise>
            <table>
              <xsl:attribute name="style">
                <xsl:text>background-image:url('</xsl:text>
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/Admin/Images/silverlightlogo.jpg');background-repeat:no-repeat;background-position:center;</xsl:text>
              </xsl:attribute>
              <xsl:choose>
                <xsl:when test="border/text()='no'">
                  <xsl:attribute name="class">
                    <xsl:text>noborder</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>videoborder</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:attribute name="width">
                <xsl:apply-templates select="width"/>
              </xsl:attribute>
              <xsl:attribute name="height">
                <xsl:apply-templates select="height"/>
              </xsl:attribute>
              <tr>
                <td>
                  <xsl:call-template name="XmlEditorInfo" />
                  <p class="txtlist">
                    <xsl:if test="$xe:labels">
                      <xsl:value-of select="$xe:labels/label[name = 'novideobrowsemode']/*[name(.) = $xe:userLanguage]/text()"/>
                    </xsl:if>
                  </p>
                </td>
              </tr>
            </table>
          </xsl:otherwise>
        </xsl:choose>
      </div>
    </div>
  </xsl:template>

  <xsl:template match="flash">
    <xsl:variable name="flashId">
      <xsl:value-of select="CM:RandomId()"/>
    </xsl:variable>
    <xsl:variable name="width">
      <xsl:choose>
        <xsl:when test="string-length(width/text()) != 0" >
          <xsl:apply-templates select="width"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>500</xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="height">
      <xsl:choose>
        <xsl:when test="string-length(height/text()) != 0" >
          <xsl:apply-templates select="height"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>500</xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <div>
      <xsl:choose>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='left'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignleft</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsfloatright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="class">
            <xsl:text>vfsfloatleft</xsl:text>
          </xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:call-template name="XmlEditorInfo" />
      <div>
        <xsl:attribute name="style">
          <xsl:text>width:</xsl:text>
          <xsl:value-of select="$width" />
          <xsl:text>;height:</xsl:text>
          <xsl:value-of select="$height" />
          <xsl:text>;</xsl:text>
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="$xe:editionMode = 'false'">
            <div>
              <xsl:attribute name="id">
                <xsl:value-of select="$flashId" />
              </xsl:attribute>
              <xsl:choose>
                <xsl:when test="uri and string-length(uri/text()) > 0">
                  <xsl:attribute name="style">
                    <xsl:text>background-image:url('</xsl:text>
                    <xsl:value-of select="uri/text()" />
                    <xsl:text>');background-repeat:no-repeat;background-position:center;width:</xsl:text>
                    <xsl:value-of select="$width" />
                    <xsl:text>px;height:</xsl:text>
                    <xsl:value-of select="$height" />
                    <xsl:text>px;</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="style">
                    <xsl:text>background-image:url('</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/Admin/Images/flashlogo.gif');background-repeat:no-repeat;background-position:center;width:</xsl:text>
                    <xsl:value-of select="$width" />
                    <xsl:text>px;height:</xsl:text>
                    <xsl:value-of select="$height" />
                    <xsl:text>px;</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:choose>
                <xsl:when test="border/text()='no'">
                  <xsl:attribute name="class">
                    <xsl:text>noborder</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>flashborder</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <a href="http://www.macromedia.com/go/getflashplayer/" style="border:0px;" target="_blank" alt="Requires Macromedia Flash. Get Macromedia Flash.">
                <img alt="Requires Macromedia Flash. Get Macromedia Flash.">
                  <xsl:attribute name="src">
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/Admin/Images/Transp.gif</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="style">
                    <xsl:text>border:0px;display:block;width:</xsl:text>
                    <xsl:value-of select="$width" />
                    <xsl:text>px;height:</xsl:text>
                    <xsl:value-of select="$height" />
                    <xsl:text>px;</xsl:text>
                  </xsl:attribute>
                </img>
              </a>
            </div>
            <script language="javascript">
              var fo = new SWFObject("<xsl:value-of select="$applicationPath" />_SiteNote/WWW/GetFile.aspx?uri=<xsl:value-of select="flashuri"/>", "11", "<xsl:value-of select="$width" />", "<xsl:value-of select="$height" />", "7");
              fo.addParam("wmode","opaque");
              fo.write("<xsl:value-of select="$flashId" />");
            </script>
          </xsl:when>
          <xsl:when test="$xe:editionMode = 'true'">
            <table>
              <xsl:choose>
                <xsl:when test="uri and string-length(uri/text()) > 0">
                  <xsl:attribute name="style">
                    <xsl:text>background-image:url('</xsl:text>
                    <xsl:value-of select="uri/text()" />
                    <xsl:text>');background-repeat:no-repeat;background-position:center;width:</xsl:text>
                    <xsl:value-of select="$width" />
                    <xsl:text>px;height:</xsl:text>
                    <xsl:value-of select="$height" />
                    <xsl:text>px;</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="style">
                    <xsl:text>background-image:url('</xsl:text>
                    <xsl:value-of select="$applicationPath" />
                    <xsl:text>_SiteNote/Admin/Images/flashlogo.gif');background-repeat:no-repeat;background-position:center;width:</xsl:text>
                    <xsl:value-of select="$width" />
                    <xsl:text>px;height:</xsl:text>
                    <xsl:value-of select="$height" />
                    <xsl:text>px;</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:choose>
                <xsl:when test="border/text()='no'">
                  <xsl:attribute name="class">
                    <xsl:text>noborder</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>flashborder</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:attribute name="width">
                <xsl:apply-templates select="width"/>
              </xsl:attribute>
              <xsl:attribute name="height">
                <xsl:apply-templates select="height"/>
              </xsl:attribute>
              <tr>
                <td>
                  <p class="txtlist">
                    <xsl:if test="$xe:labels">
                      <xsl:value-of select="$xe:labels/label[name = 'noflashbrowsemode']/*[name(.) = $xe:userLanguage]/text()"/>
                    </xsl:if>
                  </p>
                </td>
              </tr>
            </table>
          </xsl:when>
        </xsl:choose>
      </div>
    </div>
  </xsl:template>
  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="file">
    <div>
      <xsl:attribute name="style">
        <xsl:text>margin-top:5px;</xsl:text>
      </xsl:attribute>
      <!-- lien à la suite d'un paragraphe -->
      <xsl:if test="(preceding-sibling::*[1] and name(preceding-sibling::*[1]) = 'paragraph' or following-sibling::*[1] and name(following-sibling::*[1]) = 'paragraph') and wrap and wrap/text()='yes'">
        <xsl:attribute name="style">
          <xsl:text>display:inline;padding-right:5px;</xsl:text>
        </xsl:attribute>
      </xsl:if>
      <!-- end -->
      <a class="linkfile">
        <xsl:call-template name="XmlEditorCancelClick">
          <xsl:with-param name="tooltip">
            <xsl:value-of select="tooltip/text()" />
          </xsl:with-param>
        </xsl:call-template>
        <xsl:choose>
          <xsl:when test="$xe:editionMode = 'true'">
            <xsl:attribute name="href">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="fileuri"/>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="$xe:editionMode = 'false'">
            <xsl:attribute name="href">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="fileuri"/>
            </xsl:attribute>
          </xsl:when>
        </xsl:choose>
        <xsl:attribute name="target">
          <xsl:value-of select="target" />
        </xsl:attribute>
        <xsl:call-template name="XmlEditorInfo" />
        <xsl:if test="not(wrap) or (not(preceding-sibling::*[1]) or not(name(preceding-sibling::*[1]) = 'paragraph') or (name(preceding-sibling::*[1]) = 'paragraph' and wrap and wrap/text()='no')) and (not(following-sibling::*[1]) or not(name(following-sibling::*[1]) = 'paragraph') or (name(following-sibling::*[1]) = 'paragraph' and wrap and wrap/text()='no'))">
          <span class="fileIcon">
            <xsl:variable name="tmpExt" select="substring(fileuri,string-length(fileuri)-4,5)"/>
            <xsl:variable name="FileExt" select="substring-after($tmpExt,'.')"/>
            <img border="0">
              <xsl:attribute name="src">
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/WWW/GetIcon.aspx?ext=</xsl:text>
                <xsl:value-of select="$FileExt" />
              </xsl:attribute>
            </img>
          </span>
        </xsl:if>
        <span>
          <xsl:choose>
            <xsl:when test="(preceding-sibling::*[1] and name(preceding-sibling::*[1]) = 'paragraph' or following-sibling::*[1] and name(following-sibling::*[1]) = 'paragraph') and wrap and wrap/text()='yes'">
              <xsl:attribute name="class">
                <xsl:text>fileNameInParagraph</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="class">
                <xsl:text>fileName</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:choose>
            <xsl:when test="$xe:labels and string-length(filetext) = 0">
              <xsl:value-of select="$xe:labels/label[name = 'file']/*[name(.) = $xe:userLanguage]/text()"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:apply-templates select="filetext" />
            </xsl:otherwise>
          </xsl:choose>
        </span>
      </a>
    </div>
  </xsl:template>

  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

	<xsl:template match="toplink">
		<table border="0" cellpadding="3" cellspacing="0" width="100%" height="25px">
			<xsl:call-template name="XmlEditorInfo"/>
			<tr>
				<td class="linktop" width="100%" align="right" valign="top"><a href="#top"><xsl:call-template name="XmlEditorCancelClick"/><img src="{$applicationPath}Images/Template/Top.gif" border="0" width="50px" height="20px"/></a></td>
			</tr>
		</table>
	</xsl:template>-->

  <xsl:template match="toplink">
    <div class="topOfPageLink">
      <a href="#top">
        <xsl:call-template name="XmlEditorCancelClick"/>
        <xsl:call-template name="XmlEditorInfo"/>
        <xsl:text>Top</xsl:text>
      </a>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="hyperlink">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true' or $hr != ''">
        <a class="hyperlink">
          <xsl:call-template name="XmlEditorCancelClick">
            <xsl:with-param name="tooltip">
              <xsl:value-of select="tooltip/text()" />
            </xsl:with-param>
          </xsl:call-template>
          <xsl:if test="$xe:editionMode = 'true'">
            <xsl:attribute name="xe:nodeName">
              <xsl:text>hyperlink</xsl:text>
            </xsl:attribute>
            <xsl:attribute name="xe:hyperlinkType">
              <xsl:value-of select="@xe:hyperlinkType"/>
            </xsl:attribute>
            <xsl:attribute name="xe:realUrl">
              <xsl:value-of select="href/text()"/>
            </xsl:attribute>
          </xsl:if>
          <xsl:choose>
            <xsl:when test="linkanchor[string-length(text()) != 0]">
              <xsl:choose>
                <xsl:when test="$hr != ''">
                  <xsl:attribute name="href">
                    <xsl:value-of select="$hr"/>
                    <xsl:text>#</xsl:text>
                    <xsl:value-of select="linkanchor/text()"/>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="href">
                    <xsl:value-of select="href/text()"/>
                    <xsl:text>#</xsl:text>
                    <xsl:value-of select="linkanchor/text()"/>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:choose>
                <xsl:when test="$hr != ''">
                  <xsl:attribute name="href">
                    <xsl:value-of select="$hr"/>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="href">
                    <xsl:value-of select="href/text()"/>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:attribute name="target">
            <xsl:value-of select="target" />
          </xsl:attribute>
          <xsl:apply-templates select="text()" />
        </a>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates select="text()" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

	<xsl:template match="textlist/paragraph">
		<p>
			<xsl:choose>
				<xsl:when test="spacing/text()='no' and tabulation/text()='no'">
					<xsl:attribute name="class">txtlist</xsl:attribute>
				</xsl:when>
				<xsl:when test="spacing/text()='no' and tabulation/text()='yes'">
					<xsl:attribute name="class">txtlist txtlistIndent</xsl:attribute>
				</xsl:when>
				<xsl:when test="spacing/text()='yes' and tabulation/text()='yes'">
					<xsl:attribute name="class">txtlist txtlistSpacing txtlistIndent</xsl:attribute>
				</xsl:when>
				<xsl:otherwise>
					<xsl:attribute name="class">txtlist</xsl:attribute>
				</xsl:otherwise>
			</xsl:choose>
      <xsl:attribute name="style">
        text-align:<xsl:value-of select="alignment/text()" />;
      </xsl:attribute>
			<xsl:call-template name="XmlEditorInfo" />
			<xsl:apply-templates select="data"/>
		</p>
	</xsl:template>-->

  <xsl:template match="textlist/paragraph">
    <li>
      <xsl:choose>
        <xsl:when test="../style/text()='ordered'">
          <xsl:choose>
            <xsl:when test="./spacing/text()='yes' and ./tabulation/text()='no'">
              <xsl:attribute name="class">
                <xsl:text>paragraphList paragraphListSpacing</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="./spacing/text()='yes' and ./tabulation/text()='yes'">
              <xsl:attribute name="class">
                <xsl:text>paragraphList paragraphListSpacing paragraphListIndent</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:when test="./spacing/text()='no' and ./tabulation/text()='yes'">
              <xsl:attribute name="class">
                <xsl:text>paragraphList paragraphListIndent</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="class">
                <xsl:text>paragraphList</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <xsl:choose>
            <xsl:when test="./spacing/text()='yes' and ./tabulation/text()='no'">
              <xsl:choose>
                <xsl:when test="../bullet/text()='hyphen'">
                  <xsl:attribute name="class">
                    <!-- Disc -->
                    <xsl:text>paragraphList paragraphListSpacing listHyphen</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='arrow'">
                  <xsl:attribute name="class">
                    <!-- Bullet (custom) -->
                    <xsl:text>paragraphList paragraphListSpacing listArrow</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='square'">
                  <xsl:attribute name="class">
                    <!-- Square -->
                    <xsl:text>paragraphList paragraphListSpacing listSquare</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <!-- Circle -->
                    <xsl:text>paragraphList paragraphListSpacing listCircle</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="./spacing/text()='yes' and ./tabulation/text()='yes'">
              <xsl:choose>
                <xsl:when test="../bullet/text()='hyphen'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListSpacing paragraphListIndent listHyphen</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='arrow'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListSpacing paragraphListIndent listArrow</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='square'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListSpacing paragraphListIndent listSquare</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListSpacing paragraphListIndent listCircle</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="./spacing/text()='no' and ./tabulation/text()='yes'">
              <xsl:choose>
                <xsl:when test="../bullet/text()='hyphen'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListIndent listHyphen</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='arrow'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListIndent listArrow</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='square'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListIndent listSquare</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList paragraphListIndent listCircle</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:choose>
                <xsl:when test="../bullet/text()='hyphen'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList listHyphen</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='arrow'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList listArrow</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='square'">
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList listSquare</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>paragraphList listCircle</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:attribute name="style">
        <xsl:text>text-align:</xsl:text>
        <xsl:value-of select="alignment/text()" />
        <xsl:text>;</xsl:text>
      </xsl:attribute>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="data"/>
    </li>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

	<xsl:template match="list">
	<div>
		<table cellSpacing="0" cellPadding="0" border="0">
			<xsl:call-template name="XmlEditorInfo" />
			<tr>
				<td width="1"><img src="{$applicationPath}Images/Transp.gif" width="1"></img></td>
				<td align="left">
					<xsl:if test="count(item)=0">
						<xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
							<xsl:value-of select="$xe:labels/label[name = 'list']/*[name(.) = $xe:userLanguage]/text()"/>
						</xsl:if>
					</xsl:if>
					<xsl:apply-templates select="item" />
				</td>
			</tr>
			<tr>
				<td height="10"><img src="{$applicationPath}Images/Transp.gif" width="1" height="10"/></td>
			</tr>
		</table>
	</div>
	</xsl:template>-->

  <xsl:template match="list">
    <div>
      <xsl:choose>
        <xsl:when test="style/text()='ordered'">
          <ol>
            <xsl:if test="$xe:editionMode = 'true'">
              <xsl:attribute name="style">
                <xsl:text>padding-top:2px;</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:call-template name="XmlEditorInfo" />
            <xsl:choose>
              <xsl:when test="tabulation/text()='no'">
                <xsl:attribute name="class">
                  <xsl:text>orderedList</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="class">
                  <xsl:text>orderedList orderedListIndent</xsl:text>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:if test="count(item)=0">
              <li>
                <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
                  <xsl:value-of select="$xe:labels/label[name = 'list']/*[name(.) = $xe:userLanguage]/text()"/>
                </xsl:if>
              </li>
            </xsl:if>
            <xsl:apply-templates select="item" />
          </ol>
        </xsl:when>
        <xsl:otherwise>
          <ul>
            <xsl:if test="$xe:editionMode = 'true'">
              <xsl:attribute name="style">
                <xsl:text>padding-top:2px;</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:call-template name="XmlEditorInfo" />
            <xsl:choose>
              <xsl:when test="tabulation/text()='no'">
                <xsl:attribute name="class">
                  <xsl:text>unorderedList</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="class">
                  <xsl:text>unorderedList unorderedListIndent</xsl:text>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:if test="count(item)=0">
              <li>
                <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
                  <xsl:value-of select="$xe:labels/label[name = 'list']/*[name(.) = $xe:userLanguage]/text()"/>
                </xsl:if>
              </li>
            </xsl:if>
            <xsl:apply-templates select="item" />
          </ul>
        </xsl:otherwise>
      </xsl:choose>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

	<xsl:template match="item">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<xsl:call-template name="XmlEditorInfo" />
			<tr>
				<td align="left" valign="top">
					<xsl:attribute name="class">
						<xsl:choose>
							<xsl:when test="../tabulation/text()='yes'">bulletspacing</xsl:when>
							<xsl:otherwise>bullet</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
					<xsl:choose>
						<xsl:when test="../bullet/text()='hyphen'">
							<img src="{$applicationPath}Images/Template/Hyphen.gif"/>
						</xsl:when>
						<xsl:when test="../bullet/text()='arrow'">
							<img src="{$applicationPath}Images/Template/Arrow.gif"/>
            </xsl:when>
            <xsl:when test="../bullet/text()='square'">
              <img src="{$applicationPath}Images/Template/Square.gif"/>
            </xsl:when>
						<xsl:otherwise>
							<img src="{$applicationPath}Images/Template/Circle.gif"/>
						</xsl:otherwise>
					</xsl:choose>
				</td>
				<td width="100%">
					<xsl:choose>
						<xsl:when test="count(paragraph|textlist|picture|file|itemtitle)=0">
							<p class="highlight">
								<xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
									<xsl:value-of select="$xe:labels/label[name = 'item']/*[name(.) = $xe:userLanguage]/text()" />
								</xsl:if>
							</p>
						</xsl:when>
						<xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
					</xsl:choose>
				</td>
			</tr>
		</table>
	</xsl:template>

  <xsl:template match="item">
    <li class="listItem">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="count(paragraph|textlist|picture|file|itemtitle)=0">
          <p class="highlight">
            <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
              <xsl:value-of select="$xe:labels/label[name = 'item']/*[name(.) = $xe:userLanguage]/text()" />
            </xsl:if>
          </p>
        </xsl:when>
        <xsl:otherwise>
          <xsl:apply-templates />
        </xsl:otherwise>
      </xsl:choose>
    </li>
  </xsl:template>-->

  <xsl:template match="item">
    <li>
      <xsl:choose>
        <xsl:when test="../style/text()='ordered'">
          <xsl:choose>
            <xsl:when test="spacing/text()='yes'">
              <xsl:attribute name="class">
                <xsl:text>listItem</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="class">
                <xsl:text>listItem listItemIndent</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <xsl:choose>
            <xsl:when test="spacing/text()='yes'">
              <xsl:choose>
                <xsl:when test="../bullet/text()='hyphen'">
                  <xsl:attribute name="class">
                    <xsl:text>listItem listItemIndent listHyphen</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='arrow'">
                  <xsl:attribute name="class">
                    <xsl:text>listItem listItemIndent listArrow</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='square'">
                  <xsl:attribute name="class">
                    <xsl:text>listItem listItemIndent listSquare</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>listItem listItemIndent listCircle</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:choose>
                <xsl:when test="../bullet/text()='hyphen'">
                  <xsl:attribute name="class">
                    <xsl:text>listItem listHyphen</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='arrow'">
                  <xsl:attribute name="class">
                    <xsl:text>listItem listArrow</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:when test="../bullet/text()='square'">
                  <xsl:attribute name="class">
                    <xsl:text>listItem listSquare</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>listItem listCircle</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="count(paragraph|textlist|list|picture|file|itemtitle)=0">
          <p class="highlight">
            <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
              <xsl:value-of select="$xe:labels/label[name = 'item']/*[name(.) = $xe:userLanguage]/text()" />
            </xsl:if>
          </p>
        </xsl:when>
        <xsl:otherwise>
          <xsl:apply-templates />
        </xsl:otherwise>
      </xsl:choose>
    </li>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

<xsl:template match="item/paragraph">
			<xsl:choose>
				<xsl:when test="spacing/text()='no'">
						<table cellpadding="0" cellspacing="0" border="0" width="100%">
							<xsl:call-template name="XmlEditorInfo" />
							<tr>
								<td><p class="txtlistnospacing">
									<xsl:attribute name="align"><xsl:value-of select="align/text()" /></xsl:attribute>
									<xsl:apply-templates select="data"/>
								</p></td>
							</tr>
						</table>
				</xsl:when>
				<xsl:otherwise>
						<table cellpadding="0" cellspacing="0" border="0" width="100%">
							<xsl:call-template name="XmlEditorInfo" />
									<tr>
										<td>
											<p class="txtlist">
											<xsl:attribute name="align"><xsl:value-of select="align/text()" /></xsl:attribute>
											<xsl:apply-templates select="data"/>
											</p>
										</td>
									</tr>
									<tr>
										<td height="12"><img src="{$applicationPath}Images/Transp.gif" height="12" width="1"></img></td>
									</tr>
							</table>
					</xsl:otherwise>
			</xsl:choose>
	</xsl:template>-->

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="item/paragraph">
    <p class="listParagraph">
      <xsl:choose>
        <xsl:when test="spacing/text()='yes' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>paragraph paragraphSpacing</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="spacing/text()='yes' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>paragraph paragraphSpacing paragraphIndent</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="spacing/text()='no' and tabulation/text()='no'">
          <xsl:attribute name="class">
            <xsl:text>paragraph</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="spacing/text()='no' and tabulation/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>paragraph paragraphIndent</xsl:text>
          </xsl:attribute>
        </xsl:when>
      </xsl:choose>
      <xsl:attribute name="style">
        <xsl:text>text-align:</xsl:text>
        <xsl:value-of select="alignment/text()" />
        <xsl:text>;</xsl:text>
      </xsl:attribute>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="data"/>
    </p>
  </xsl:template>

  <xsl:template match="item/file">
    <div>
      <a class="linkfile">
        <xsl:call-template name="XmlEditorCancelClick">
          <xsl:with-param name="tooltip">
            <xsl:value-of select="tooltip/text()" />
          </xsl:with-param>
        </xsl:call-template>
        <xsl:choose>
          <xsl:when test="$xe:editionMode = 'true'">
            <xsl:attribute name="href">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="fileuri"/>
            </xsl:attribute>
          </xsl:when>
          <xsl:when test="$xe:editionMode = 'false'">
            <xsl:attribute name="href">
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="fileuri"/>
            </xsl:attribute>
          </xsl:when>
        </xsl:choose>
        <xsl:attribute name="target">
          <xsl:value-of select="target" />
        </xsl:attribute>
        <xsl:call-template name="XmlEditorInfo" />
        <xsl:choose>
          <xsl:when test="$xe:labels and string-length(filetext) = 0">
            <xsl:value-of select="$xe:labels/label[name = 'file']/*[name(.) = $xe:userLanguage]/text()"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:apply-templates select="filetext" />
          </xsl:otherwise>
        </xsl:choose>
      </a>
    </div>
  </xsl:template>

  <xsl:template match="item/picture">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <div>
      <xsl:call-template name="XmlEditorInfo" />
      <a>
        <xsl:choose>
          <xsl:when test="string-length(href/text()) != 0">
            <xsl:call-template name="XmlEditorCancelClick">
              <xsl:with-param name="tooltip">
                <xsl:value-of select="tooltip/text()" />
              </xsl:with-param>
            </xsl:call-template>
            <xsl:choose>
              <xsl:when test="linkanchor[string-length(text()) != 0]">
                <xsl:attribute name="href">
                  <xsl:value-of select="$hr"/>
                  <xsl:text>#</xsl:text>
                  <xsl:value-of select="linkanchor/text()"/>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="href">
                  <xsl:value-of select="$hr"/>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:attribute name="target">
              <xsl:value-of select="target" />
            </xsl:attribute>
          </xsl:when>
          <xsl:otherwise>
            <xsl:if test="string-length(linkuri/text()) != 0">
              <xsl:call-template name="XmlEditorCancelClick">
                <xsl:with-param name="tooltip">
                  <xsl:value-of select="tooltip/text()" />
                </xsl:with-param>
              </xsl:call-template>
              <xsl:attribute name="href">
                <xsl:value-of select="$applicationPath" />
                <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
                <xsl:value-of select="linkuri" />
              </xsl:attribute>
              <xsl:attribute name="target">
                <xsl:value-of select="target" />
              </xsl:attribute>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
        <img>
          <xsl:choose>
            <xsl:when test="border/text()='no'">
              <xsl:attribute name="class">
                <xsl:text>noborder</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="class">
                <xsl:text>imageborder</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:attribute name="src">
            <xsl:value-of select="$applicationPath" />
            <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
            <xsl:value-of select="uri"/>
          </xsl:attribute>
          <xsl:if test="string-length(height/text()) != 0">
            <xsl:attribute name="height">
              <xsl:value-of select="height/text()" />
            </xsl:attribute>
          </xsl:if>
          <xsl:if test="string-length(width/text()) != 0">
            <xsl:attribute name="width">
              <xsl:value-of select="width/text()"  />
            </xsl:attribute>
          </xsl:if>
          <xsl:if test="string-length(tooltip/text()) != 0">
            <xsl:attribute name="alt">
              <xsl:value-of select="tooltip/text()"  />
            </xsl:attribute>
          </xsl:if>
          <xsl:if test="overuri">
            <xsl:attribute name="onmouseover">
              <xsl:text>this.src='</xsl:text>
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>              
              <xsl:value-of select="overuri"/>
              <xsl:text>';</xsl:text>
            </xsl:attribute>
            <xsl:attribute name="onmouseout">
              <xsl:text>this.src='</xsl:text>
              <xsl:value-of select="$applicationPath" />
              <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
              <xsl:value-of select="uri"/>
              <xsl:text>';</xsl:text>
            </xsl:attribute>
          </xsl:if>
        </img>
      </a>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

	
	<xsl:template match="textlist">
	<div>
		<table border="0" cellpadding="0" cellspacing="0">
		<xsl:call-template name="XmlEditorInfo" />
			<tr>
				<td>
				<xsl:for-each select="paragraph">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td align="left" valign="top">
								<xsl:attribute name="class">
									<xsl:choose>
										<xsl:when test="../tabulation/text()='yes'">bulletspacing</xsl:when>
										<xsl:otherwise>bullet</xsl:otherwise>
									</xsl:choose>
								</xsl:attribute>
								<xsl:choose>
									<xsl:when test="../bullet/text()='hyphen'">
										<img src="{$applicationPath}Images/Template/Hyphen.gif"/>
									</xsl:when>
									<xsl:when test="../bullet/text()='arrow'">
										<img src="{$applicationPath}Images/Template/Arrow.gif"/>
									</xsl:when>
                  <xsl:when test="../bullet/text()='square'">
                    <img src="{$applicationPath}Images/Template/Square.gif"/>
                  </xsl:when>
									<xsl:otherwise>
										<img src="{$applicationPath}Images/Template/Circle.gif"/>
									</xsl:otherwise>
								</xsl:choose>
							</td>
							<td valign="top" width="100%"><xsl:apply-templates select="." /></td>
						</tr>
					</table>
				</xsl:for-each>
				</td>
			</tr>
		</table>
	</div>
	</xsl:template>-->

  <xsl:template match="textlist">
    <div>
      <xsl:choose>
        <xsl:when test="style/text()='ordered'">
          <ol>
            <xsl:if test="$xe:editionMode = 'true'">
              <xsl:attribute name="style">
                <xsl:text>padding-top:3px;</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:call-template name="XmlEditorInfo" />
            <xsl:choose>
              <xsl:when test="tabulation/text()='no'">
                <xsl:attribute name="class">
                  <xsl:text>orderedList</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="class">
                  <xsl:text>orderedList orderedListIndent</xsl:text>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:apply-templates select="paragraph" />
          </ol>
        </xsl:when>
        <xsl:otherwise>
          <ul>
            <xsl:if test="$xe:editionMode = 'true'">
              <xsl:attribute name="style">
                <xsl:text>padding-top:3px;</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:call-template name="XmlEditorInfo" />
            <xsl:choose>
              <xsl:when test="tabulation/text()='no'">
                <xsl:attribute name="class">
                  <xsl:text>unorderedList</xsl:text>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="class">
                  <xsl:text>unorderedList unorderedListIndent</xsl:text>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
            <xsl:apply-templates select="paragraph|textlist" />
            <!--<xsl:apply-templates select="paragraph" />-->
          </ul>
        </xsl:otherwise>
      </xsl:choose>
    </div>
  </xsl:template>




  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="anchor">
    <a href="#">
      <xsl:attribute name="name">
        <xsl:apply-templates />
      </xsl:attribute>
      <img border="0" src="{$applicationPath}Images/Transp.gif" width="1" height="1" style="display:none" />
    </a>
  </xsl:template>

  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="diaporama">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <xsl:variable name="width">
      <xsl:choose>
        <xsl:when test="string-length(width/text()) != 0" >
          <xsl:apply-templates select="width"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>200</xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="height">
      <xsl:choose>
        <xsl:when test="string-length(height/text()) != 0" >
          <xsl:apply-templates select="height"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>200</xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <div>
      <xsl:choose>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='no' and ./hpos/text()='left'">
          <xsl:attribute name="class">
            <xsl:text>vfsalignleft</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='right'">
          <xsl:attribute name="class">
            <xsl:text>vfsfloatright</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="./wrap/text()='yes' and ./hpos/text()='center'">
          <xsl:attribute name="class">
            <xsl:text>vfsaligncenter</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="class">
            <xsl:text>vfsfloatleft</xsl:text>
          </xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:call-template name="XmlEditorInfo" />
      <div>
        <xsl:if test="$xe:editionMode = 'false'">
          <xsl:attribute name="style">
            <xsl:text>width:</xsl:text>
            <xsl:value-of select="$width" />
            <xsl:text>;height:</xsl:text>
            <xsl:value-of select="$height" />
            <xsl:text>;</xsl:text>
          </xsl:attribute>
        </xsl:if>
        
        <script>
          var sysApp = Sys;
        </script>

        <table cellpadding="0" cellspacing="0" border="0">
          <xsl:choose>
            <xsl:when test="border/text()='no'">
              <xsl:attribute name="class">
                <xsl:text>noborder</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="class">
                <xsl:text>slideshowborder</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:if test="$xe:editionMode = 'false'">
            <xsl:attribute name="width">
              <xsl:value-of select="$width" />
            </xsl:attribute>
            <xsl:attribute name="height">
              <xsl:value-of select="$height" />
            </xsl:attribute>
          </xsl:if>
          <xsl:if test="$xe:editionMode = 'true'">
            <tr>
              <td>
                <img src="{$applicationPath}Images/Transp.gif" height="5" width="100%"></img>
              </td>
            </tr>
          </xsl:if>
          <tr>
            <td>
              <xsl:attribute name="width">
                <xsl:value-of select="$width" />
              </xsl:attribute>
              <xsl:attribute name="height">
                <xsl:value-of select="$height" />
              </xsl:attribute>
              <xsl:choose>
                <xsl:when test="string-length(href/text()) != 0">
                  <xsl:attribute name="style">
                    <xsl:text>cursor:hand</xsl:text>
                  </xsl:attribute>
                  <xsl:choose>
                    <xsl:when test="linkanchor[string-length(text()) != 0]">
                      <xsl:attribute name="onclick">
                        <xsl:text>window.open('</xsl:text>
                        <xsl:value-of select="$hr"/>
                        <xsl:text>#</xsl:text>
                        <xsl:value-of select="linkanchor/text()"/>
                        <xsl:text>','</xsl:text>
                        <xsl:value-of select="target" />
                        <xsl:text>');</xsl:text>
                      </xsl:attribute>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:attribute name="onclick">
                        <xsl:text>window.open('</xsl:text>
                        <xsl:value-of select="$hr"/>
                        <xsl:text>','</xsl:text>
                        <xsl:value-of select="target" />
                        <xsl:text>');</xsl:text>
                      </xsl:attribute>
                    </xsl:otherwise>
                  </xsl:choose>
                  <xsl:call-template name="XmlEditorCancelClick">
                    <xsl:with-param name="tooltip">
                      <xsl:value-of select="tooltip/text()" />
                    </xsl:with-param>
                  </xsl:call-template>
                  <xsl:choose>
                    <xsl:when test="$xe:editionMode = 'true'">
                      <xsl:apply-templates select="imagediaporama" />
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:call-template name="ServerControlImageDiaporama"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="title">
                    <xsl:apply-templates select="tooltip/text()" />
                  </xsl:attribute>
                  <xsl:choose>
                    <xsl:when test="$xe:editionMode = 'true'">
                      <xsl:apply-templates select="imagediaporama" />
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:call-template name="ServerControlImageDiaporama"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:otherwise>
              </xsl:choose>
            </td>
          </tr>
        </table>
        
        <script>
          window.Sys = sysApp;
        </script>
        
      </div>
    </div>
  </xsl:template>

  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template name="ServerControlImageDiaporama">
    <xsl:call-template name="XmlEditorStartServerControlBlock"/>
    <type>CrossFactory.SiteNote.XmlEditor.Controls.Diaporama, SiteNote.Diaporama</type>
    <virtualPath>
      <xsl:value-of select="$applicationPath"/>
      <xsl:text>Controls/Common/Diaporama.ascx</xsl:text>
    </virtualPath>
    <property>
      <name>Images</name>
      <value>
        <xsl:for-each select="imagediaporama">
          <xsl:value-of select="$applicationPath" />
          <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text><xsl:value-of select="uri"/>
          <xsl:text>|</xsl:text>
        </xsl:for-each>
      </value>
    </property>
    <property>
      <name>ImageWidth</name>
      <value>
        <xsl:value-of select="./width/text()"  />
      </value>
    </property>
    <property>
      <name>ImageHeight</name>
      <value>
        <xsl:value-of select="./height/text()"  />
      </value>
    </property>
    <property>
      <name>RotatorType</name>
      <value>
        <xsl:value-of select="./rotatortype/text()"  />
      </value>
    </property>
    <property>
      <name>RotatorTime</name>
      <value>
        <xsl:value-of select="./rotatortime/text()"  />
      </value>
    </property>
    <xsl:call-template name="XmlEditorEndServerControlBlock"/>
  </xsl:template>
  
  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="imagediaporama">
    <div>
      <xsl:call-template name="XmlEditorInfo" />
      <img border="0">
        <xsl:attribute name="src">
          <xsl:value-of select="$applicationPath" />
          <xsl:text>_SiteNote/WWW/GetFile.aspx?uri=</xsl:text>
          <xsl:value-of select="uri"/>
        </xsl:attribute>
      </img>
    </div>
  </xsl:template>
  
  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

	<xsl:template match="section[colored/text()='yes']/linkmore|sectionform[colored/text()='yes']/linkmore|subsectionform[colored/text()='yes']/linkmore">
		<xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
		<table border="0" cellpadding="0" cellspacing="3" width="100%" height="12">
			<xsl:call-template name="XmlEditorInfo"/>
			<tr>
				<td width="100%" valign="top" align="right">
				<a>
				<xsl:call-template name="XmlEditorCancelClick">
					<xsl:with-param name="tooltip"><xsl:value-of select="tooltip/text()" /></xsl:with-param>
				</xsl:call-template>
				<xsl:choose>
						<xsl:when test="linkanchor[string-length(text()) != 0]">
							
              <xsl:attribute name="href"><xsl:value-of select="$hr"/>#<xsl:value-of select="linkanchor/text()"/></xsl:attribute>
						</xsl:when>
						<xsl:otherwise>
							<xsl:attribute name="href"><xsl:value-of select="$hr"/></xsl:attribute>
						</xsl:otherwise>
					</xsl:choose>
				<xsl:attribute name="target">
					<xsl:value-of select="target" />
				</xsl:attribute>
				<img src="{$applicationPath}Images/Template/More.gif" border="0"/>
				</a></td>
				<td width="5"><img src="{$applicationPath}Images/Transp.gif" height="1" width="5"></img></td>
			</tr>
		</table>
	</xsl:template>-->

  <xsl:template match="section[colored/text()='yes']/linkmore|sectionform[colored/text()='yes']/linkmore|subsectionform[colored/text()='yes']/linkmore">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <div class="moreLink">
      <a>
        <xsl:call-template name="XmlEditorCancelClick">
          <xsl:with-param name="tooltip">
            <xsl:value-of select="tooltip/text()" />
          </xsl:with-param>
        </xsl:call-template>
        <xsl:choose>
          <xsl:when test="linkanchor[string-length(text()) != 0]">
            <xsl:attribute name="href">
              <xsl:value-of select="$hr"/>
              <xsl:text>#</xsl:text>
              <xsl:value-of select="linkanchor/text()"/>
            </xsl:attribute>
          </xsl:when>
          <xsl:otherwise>
            <xsl:attribute name="href">
              <xsl:value-of select="$hr"/>
            </xsl:attribute>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:attribute name="target">
          <xsl:value-of select="target" />
        </xsl:attribute>
        <xsl:call-template name="XmlEditorInfo" />

        <xsl:text>More</xsl:text>
      </a>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FORM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="sectionform">
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <div>
      <xsl:choose>
        <xsl:when test="colored/text()='yes'">
          <xsl:attribute name="class">
            <xsl:text>sectionForm sectionFormColored sectionFormMargin</xsl:text>
          </xsl:attribute>
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:apply-templates select="sectiontitle"/>
          <xsl:apply-templates select="anchor" />
          <!--<xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-calendarelement|form-filefieldelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement">-->
          <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
            <xsl:with-param name="form-labelwidth" select="./form-labelwidth/text()"></xsl:with-param>
            <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
          </xsl:apply-templates>
          <xsl:apply-templates select="form-submitbutton"/>
          <xsl:call-template name="ServerControlCalendar"></xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="class">
            <xsl:text>sectionForm sectionFormMargin</xsl:text>
          </xsl:attribute>
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:apply-templates select="sectiontitle"/>
          <xsl:apply-templates select="anchor" />
          <!--<xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-calendarelement|form-filefieldelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement">-->
          <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
            <xsl:with-param name="form-labelwidth" select="./form-labelwidth/text()"></xsl:with-param>
            <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
          </xsl:apply-templates>
          <xsl:apply-templates select="form-submitbutton"/>
          <xsl:call-template name="ServerControlCalendar"></xsl:call-template>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:if test="requirefieldserrortext and string-length(requirefieldserrortext/text()) != 0">
        <input type="hidden" name="_requirefieldserrortext">
          <xsl:attribute name="value">
            <xsl:value-of select="requirefieldserrortext/text()"/>
          </xsl:attribute>
        </input>
      </xsl:if>
      <xsl:if test="regexfieldserrortext and string-length(regexfieldserrortext/text()) != 0">
        <input type="hidden" name="_regexfieldserrortext">
          <xsl:attribute name="value">
            <xsl:value-of select="regexfieldserrortext/text()"/>
          </xsl:attribute>
        </input>
      </xsl:if>
      <xsl:if test="captchafieldserrortext and string-length(captchafieldserrortext/text()) != 0">
        <input type="hidden" name="_captchafieldserrortext">
          <xsl:attribute name="value">
            <xsl:value-of select="captchafieldserrortext/text()"/>
          </xsl:attribute>
        </input>
      </xsl:if>
      <xsl:if test="memberfieldserrortext and string-length(memberfieldserrortext/text()) != 0">
        <input type="hidden" name="_memberfieldserrortext">
          <xsl:attribute name="value">
            <xsl:value-of select="memberfieldserrortext/text()"/>
          </xsl:attribute>
        </input>
      </xsl:if>
      <input type="hidden" id="SavedHtmlForm" name="SavedHtmlForm"></input>
    </div>
  </xsl:template>
 
  <!-- 
    <xsl:template match="sectionform">
		<xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
		<xsl:choose>
			<xsl:when test="colored/text()='yes'">
				<table cellpadding="0" cellspacing="0" border="0" width="100%" class="formSection">
					<tr>
						<td>
							<table id="StartForm" class="sectioncolored" cellpadding="0" cellspacing="0" width="100%">
								<xsl:call-template name="XmlEditorInfo" />	
								<tr>
									<td>
										<xsl:apply-templates select="sectiontitle"/>
									</td>
								</tr>
								<tr>
									<td class="sectioncoloredmargin">
										<xsl:apply-templates select="anchor" />
  <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
    <xsl:with-param name="form-labelwidth" select="./form-labelwidth/text()"></xsl:with-param>
    <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
  </xsl:apply-templates>
  </td>
  </tr>
  <tr>
    <td class="sectioncoloredmargin">
      <xsl:apply-templates select="form-submitbutton"/>
    </td>
  </tr>
  <tr width="100">
    <td class="sectioncoloredmargin">
      <xsl:call-template name="ServerControlCalendar"></xsl:call-template>
    </td>
  </tr>
  <tr>
    <td height="9">
      <img src="{$applicationPath}Images/Transp.gif" height="9"/>
    </td>
  </tr>
  </table>
  </td>
  <td>
    <img src="{$applicationPath}Images/Transp.gif" width="10" height="1"/>
  </td>
  </tr>
  <tr>
    <td height="8">
      <img src="{$applicationPath}Images/Transp.gif" height="8"/>
    </td>
  </tr>
  </table>
  </xsl:when>
  <xsl:otherwise>
    <table class="uncolored" cellpadding="0" cellspacing="0" border="0"  width="100%">
      <xsl:call-template name="XmlEditorInfo" />
      <tr>
        <td height="4">
          <img src="{$applicationPath}Images/Transp.gif" height="4"/>
        </td>
      </tr>
      <tr>
        <td>
          <xsl:apply-templates select="sectiontitle"/>
        </td>
      </tr>
      <tr>
        <td class="sectionmargin">
          <xsl:apply-templates select="anchor" />
          <xsl:apply-templates select="linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
            <xsl:with-param name="form-labelwidth" select="./form-labelwidth/text()"></xsl:with-param>
            <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
          </xsl:apply-templates>
        </td>
      </tr>
      <tr>
        <td class="sectionmargin">
          <xsl:apply-templates select="form-submitbutton"/>
        </td>
      </tr>
      <tr class="calendarClass" valign="bottom">
        <td class="sectionmargin">
          <xsl:call-template name="ServerControlCalendar"></xsl:call-template>
        </td>
      </tr>
      <tr>
        <td height="10">
          <img src="{$applicationPath}Images/Transp.gif" height="10"/>
        </td>
      </tr>
    </table>
  </xsl:otherwise>
  </xsl:choose>
  </xsl:template>

  

  <xsl:template match="subsectionform">
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true' and count(//form-stepelement) &gt; 1">
        <fieldset style="padding:5px;">
          <legend class="formfieldstatut">
            <xsl:choose>
              <xsl:when test="./step/text() != ''">
                <xsl:value-of select="./step/text()" />
              </xsl:when>
              <xsl:otherwise>*</xsl:otherwise>
            </xsl:choose>
          </legend>
          <xsl:choose>
            <xsl:when test="colored/text()='yes'">
              <table cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                  <td>
                    <table class="sectioncolored" cellpadding="0" cellspacing="0" width="100%">
                      <xsl:call-template name="XmlEditorInfo" />
                      <tr>
                        <td>
                          <xsl:apply-templates select="sectiontitle"/>
                        </td>
                      </tr>
                      <tr>
                        <td class="sectioncoloredmargin">
                          <xsl:apply-templates select="anchor" />
                          <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
                            <xsl:with-param name="readonlyParent">
                              <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                            </xsl:with-param>
                            <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                            <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
                          </xsl:apply-templates>
                        </td>
                      </tr>
                      <tr>
                        <td height="9">
                          <img src="{$applicationPath}Images/Transp.gif" height="9"/>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td>
                    <img src="{$applicationPath}Images/Transp.gif" width="10" height="1"/>
                  </td>
                </tr>
                <tr>
                  <td height="8">
                    <img src="{$applicationPath}Images/Transp.gif" height="8"/>
                  </td>
                </tr>
              </table>
            </xsl:when>
            <xsl:otherwise>
              <table class="sectionuncolored" cellpadding="0" cellspacing="0" width="100%">
                <xsl:call-template name="XmlEditorInfo" />
                <tr>
                  <td height="4" colspan="2">
                    <img src="{$applicationPath}Images/Transp.gif" height="4"/>
                  </td>
                </tr>
                <tr>
                  <td>
                    <xsl:apply-templates select="sectiontitle"/>
                  </td>
                </tr>
                <tr>
                  <td class="sectionmargin">
                    <xsl:apply-templates select="anchor" />
                    <xsl:apply-templates select="linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
                      <xsl:with-param name="readonlyParent">
                        <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                      </xsl:with-param>
                      <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
                      <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                    </xsl:apply-templates>
                  </td>
                </tr>
                <tr>
                  <td height="10">
                    <img src="{$applicationPath}Images/Transp.gif" height="10"/>
                  </td>
                </tr>
              </table>
            </xsl:otherwise>
          </xsl:choose>
        </fieldset>
      </xsl:when>
      <xsl:when test="$xe:editionMode = 'true' or $isVisibleStep = '' or $isVisibleStep = 'true'">
        <xsl:choose>
          <xsl:when test="colored/text()='yes'">
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
              <tr>
                <td>
                  <table class="sectioncolored" cellpadding="0" cellspacing="0" width="100%">
                    <xsl:call-template name="XmlEditorInfo" />
                    <tr>
                      <td>
                        <xsl:apply-templates select="sectiontitle"/>
                      </td>
                    </tr>
                    <tr>
                      <td class="sectioncoloredmargin">
                        <xsl:apply-templates select="anchor" />
                        <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
                          <xsl:with-param name="readonlyParent">
                            <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                          </xsl:with-param>
                          <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
                          <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                        </xsl:apply-templates>
                      </td>
                    </tr>
                    <tr>
                      <td height="9">
                        <img src="{$applicationPath}Images/Transp.gif" height="9"/>
                      </td>
                    </tr>
                  </table>
                </td>
                <td>
                  <img src="{$applicationPath}Images/Transp.gif" width="10" height="1"/>
                </td>
              </tr>
              <tr>
                <td height="8">
                  <img src="{$applicationPath}Images/Transp.gif" height="8"/>
                </td>
              </tr>
            </table>
          </xsl:when>
          <xsl:otherwise>
            <table class="sectionuncolored" cellpadding="0" cellspacing="0" width="100%">
              <xsl:call-template name="XmlEditorInfo" />
              <tr>
                <td height="4" colspan="2">
                  <img src="{$applicationPath}Images/Transp.gif" height="4"/>
                </td>
              </tr>
              <tr>
                <td>
                  <xsl:apply-templates select="sectiontitle"/>
                </td>
              </tr>
              <tr>
                <td class="sectionmargin">
                  <xsl:apply-templates select="anchor" />
                  <xsl:apply-templates select="linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiogroupelement">
                    <xsl:with-param name="readonlyParent">
                      <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                    </xsl:with-param>
                    <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                    <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
                  </xsl:apply-templates>
                </td>
              </tr>
              <tr>
                <td height="10">
                  <img src="{$applicationPath}Images/Transp.gif" height="10"/>
                </td>
              </tr>
            </table>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  -->

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="subsectionform">
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true' and count(//form-stepelement) &gt; 1">
        <fieldset style="padding:5px;">
          <legend class="formfieldstatut">
            <!--<xsl:attribute name="class">formfieldstatut</xsl:attribute>-->
            <xsl:choose>
              <xsl:when test="./step/text() != ''">
                <xsl:value-of select="./step/text()" />
              </xsl:when>
              <xsl:otherwise>*</xsl:otherwise>
            </xsl:choose>
          </legend>
          <xsl:choose>
            <xsl:when test="colored/text()='yes'">
              <div class="subSectionForm subSectionFormColored subSectionFormMargin">
                <xsl:call-template name="XmlEditorInfo" />
                <xsl:if test="$xe:editionMode = 'true'">
                  <img src="{$applicationPath}Images/Transp.gif" height="3px" width="100%"/>
                </xsl:if>
                <xsl:apply-templates select="sectiontitle"/>
                <xsl:apply-templates select="anchor" />
                <!--<xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-calendarelement|form-filefieldelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement">-->
                <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
                  <xsl:with-param name="readonlyParent">
                    <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                  </xsl:with-param>
                  <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
                </xsl:apply-templates>
              </div>
            </xsl:when>
            <xsl:otherwise>
              <div class="subSectionForm subSectionFormMargin">
                <xsl:call-template name="XmlEditorInfo" />
                <xsl:if test="$xe:editionMode = 'true'">
                  <img src="{$applicationPath}Images/Transp.gif" height="3px" width="100%"/>
                </xsl:if>
                <xsl:apply-templates select="sectiontitle"/>
                <xsl:apply-templates select="anchor" />
                <!--<xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-calendarelement|form-filefieldelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement">-->
                <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
                  <xsl:with-param name="readonlyParent">
                    <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                  </xsl:with-param>
                  <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
                </xsl:apply-templates>
              </div>
            </xsl:otherwise>
          </xsl:choose>
        </fieldset>
      </xsl:when>
      <xsl:when test="$xe:editionMode = 'true' or $isVisibleStep = '' or $isVisibleStep = 'true'">
        <xsl:choose>
          <xsl:when test="colored/text()='yes'">
            <div class="subSectionForm subSectionFormColored subSectionFormMargin">
              <xsl:call-template name="XmlEditorInfo" />
              <xsl:if test="$xe:editionMode = 'true'">
                  <img src="{$applicationPath}Images/Transp.gif" height="3px" width="100%"/>
                </xsl:if>
              <xsl:apply-templates select="sectiontitle"/>
              <xsl:apply-templates select="anchor" />
              <!--<xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-calendarelement|form-filefieldelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement">-->
              <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
                <xsl:with-param name="readonlyParent">
                  <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                </xsl:with-param>
                <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
              </xsl:apply-templates>
            </div>
          </xsl:when>
          <xsl:otherwise>
            <div class="subSectionForm subSectionFormMargin">
              <xsl:call-template name="XmlEditorInfo" />
              <xsl:if test="$xe:editionMode = 'true'">
                  <img src="{$applicationPath}Images/Transp.gif" height="3px" width="100%"/>
                </xsl:if>
              <xsl:apply-templates select="sectiontitle"/>
              <xsl:apply-templates select="anchor" />
              <!--<xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-calendarelement|form-filefieldelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement">-->
              <xsl:apply-templates select="linkmore|html|subtitle|spacer|picture|paragraph|textlist|list|file|horizontalline|video|section|flash|toplink|diaporama|subsectionform|form-hiddenelement|form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-stepelement|form-customelement|form-checkboxelement|form-radiobuttongroupelement|form-userelement|form-captchaelement">
                <xsl:with-param name="readonlyParent">
                  <xsl:value-of select="$readonlyParent" />,<xsl:value-of select="readonly/text()" />
                </xsl:with-param>
                <xsl:with-param name="isVisibleStep" select="$isVisibleStep" />
                <xsl:with-param name="form-labelwidth" select="$form-labelwidth"></xsl:with-param>
              </xsl:apply-templates>
            </div>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

  <!--<xsl:template match="form-textfieldelement|form-calendarelement|form-filefieldelement|form-dropdownelement|form-listboxelement|form-checkboxelement|form-radiobuttongroupelement">-->
  <xsl:template match="form-textfieldelement|form-emailfieldelement|form-filefieldelement|form-calendarelement|form-dropdownelement|form-listboxelement|form-checkboxelement|form-radiobuttongroupelement">
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:variable name="isVisibleStep">
      <xsl:choose>
        <xsl:when test="$currentStep = ''">true</xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="isReadOnly">
      <xsl:choose>
        <xsl:when test="$currentStep = ''">false</xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="CM:ContaintStep(concat($readonlyParent, ',', string(./readonly/text())), string($currentStep))" />
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true' and count(//form-stepelement) &gt; 1">
        <fieldset style="padding:5px;">
          <legend class="formtext">
            <xsl:choose>
              <xsl:when test="./step/text() != ''">
                <xsl:value-of select="./step/text()" />
              </xsl:when>
              <xsl:otherwise>*</xsl:otherwise>
            </xsl:choose>
          </legend>
          <span>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <xsl:call-template name="XmlEditorInfo" />
              <tr>
                <td class="tdformlabel">
                  <xsl:apply-templates select="label">
                    <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                  </xsl:apply-templates>
                </td>
                <td class="tdformvalue">
                  <table cellpadding="0" cellspacing="0">
                    <tr>
                      <xsl:choose>
                        <xsl:when test="count(formtext|textfield|filefield|dropdown|listbox|checkbox|radiobuttongroup)=0">
                          <!--<xsl:when test="count(formtext|textfield|dropdown|listbox|checkbox|radiobuttongroup)=0">-->
                          <p class="txtlist">
                            <xsl:if test="$xe:labels">
                              <xsl:value-of select="$xe:labels/label[name = 'formelement']/*[name(.) = $xe:userLanguage]/text()"/>
                            </xsl:if>
                          </p>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:apply-templates select="formtext|textfield|filefield|dropdown|listbox|checkbox|radiobuttongroup">
                            <!--<xsl:apply-templates select="formtext|textfield|dropdown|listbox|checkbox|radiobuttongroup">-->
                            <xsl:with-param name="isReadOnly" select="$isReadOnly" />
                            <xsl:with-param name="pos" select="position()" />
                          </xsl:apply-templates>
                        </xsl:otherwise>
                      </xsl:choose>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </span>
        </fieldset>
      </xsl:when>
      <!--<xsl:when test="$xe:editionMode = 'true' or $steplower = '' or $steplower = $currentStep">-->
      <xsl:when test="$xe:editionMode = 'true' or $isVisibleStep = '' or $isVisibleStep = 'true'">
        <span>
          <table cellpadding="0" cellspacing="0" class="tableform">
            <xsl:call-template name="XmlEditorInfo" />
            <tr>
              <td class="tdformlabel">
                <xsl:apply-templates select="label">
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                </xsl:apply-templates>
              </td>
              <td class="tdformvalue">
                <table cellpadding="0" cellspacing="0">
                  <tr>
                    <xsl:choose>
                      <xsl:when test="count(formtext|textfield|filefield|dropdown|listbox|checkbox|radiobuttongroup)=0">
                        <!--<xsl:when test="count(formtext|textfield|dropdown|listbox|checkbox|radiobuttongroup)=0">-->
                        <p class="txtlist">
                          <xsl:if test="$xe:labels">
                            <xsl:value-of select="$xe:labels/label[name = 'formelement']/*[name(.) = $xe:userLanguage]/text()"/>
                          </xsl:if>
                        </p>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:apply-templates select="formtext|textfield|filefield|dropdown|listbox|checkbox|radiobuttongroup">
                          <!--<xsl:apply-templates select="formtext|textfield|dropdown|listbox|checkbox|radiobuttongroup">-->
                          <xsl:with-param name="pos" select="position()" />
                          <xsl:with-param name="isReadOnly" select="$isReadOnly" />
                        </xsl:apply-templates>
                      </xsl:otherwise>
                    </xsl:choose>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
        </span>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

									form-userelement			-->

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="form-stepelement">
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(name/text()), string($currentStep))" />
    <xsl:if test="$xe:editionMode = 'true' or (not(./name) or $isVisibleStep = 'true' and $xe:transformForEmail != 'true' and count(./steplistbox/steplistboxvalue) &gt; 1)">
      <xsl:if test="CM:FirstStep() = 'true'">
        <table cellpadding="0" cellspacing="0" border="0" height="1" width="100%">
          <tr>
            <td height="5" width="3" colspan="2">
              <img src="{$applicationPath}Images/Transp.gif" width="100%" height="5"/>
            </td>
          </tr>
          <tr>
            <td height="6" width="3" colspan="3">
              <img src="{$applicationPath}Images/Transp.gif" width="100%" height="6"/>
            </td>
          </tr>
        </table>
      </xsl:if>
      <span style="padding:4px">
        <xsl:call-template name="XmlEditorInfo" />
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td valign="top">
              <xsl:apply-templates select="label" />
            </td>
            <td valign="top" width="100%">
              <table>
                <tr>
                  <xsl:choose>
                    <xsl:when test="count(formtext|steplistbox)=0">
                      <p class="txtlist">
                        <xsl:if test="$xe:labels">
                          <xsl:value-of select="$xe:labels/label[name = 'formelement']/*[name(.) = $xe:userLanguage]/text()"/>
                        </xsl:if>
                      </p>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:apply-templates select="formtext|steplistbox"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td colspan="2">
              <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
            </td>
          </tr>
        </table>
      </span>
    </xsl:if>
    <xsl:if test="not(./name) or $isVisibleStep = 'true' and $xe:transformForEmail != 'true' and count(./steplistbox/steplistboxvalue) &lt; 2">
      <table style="display:none;">
        <tr>
          <!--<xsl:apply-templates select="steplistbox"/>-->
        </tr>
      </table>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="label">
    <xsl:param name="form-labelwidth" />
    <table border="0" cellpadding="0" cellspacing="0">
      <xsl:call-template name="XmlEditorInfo" />
      <tr>
        <td>
          <xsl:attribute name="width">
            <xsl:choose>
              <xsl:when test="string-length(../../form-labelwidth/text()) != 0">
                <xsl:value-of select="../../form-labelwidth/text()" />
              </xsl:when>
              <!--<xsl:when test="string-length($form-labelwidth/text()) != 0">
									<xsl:value-of select="$form-labelwidth/text()"/>
								</xsl:when>-->
              <xsl:when test="string-length($form-labelwidth) != 0">
                <xsl:value-of select="$form-labelwidth" />
              </xsl:when>
              <xsl:otherwise>
                <xsl:text>150px</xsl:text>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:attribute>
          <xsl:choose>
            <xsl:when test="../textfield/mandatory = 'yes' or ../filefield/mandatory = 'yes' or ../listbox/mandatory = 'yes' or ../dropdown/mandatory = 'yes' or ../radiobuttongroup/mandatory = 'yes'">
              <xsl:attribute name="class">
                <xsl:text>formlabel mandatoryLabel</xsl:text>
              </xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
              <xsl:attribute name="class">
                <xsl:text>formlabel</xsl:text>
              </xsl:attribute>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:apply-templates select="value" />
        </td>
      </tr>
    </table>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="formtext">
    <td valign="top" class="formtext">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="text"/>
    </td>
    <xsl:if test="br/text()='yes'">
      <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;/table&gt;&lt;table&gt;&lt;tr&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="textfield">
    <xsl:param name="isReadOnly"></xsl:param>
    <xsl:param name="pos">00</xsl:param>
    <td valign="top">
      <xsl:choose>
        <xsl:when test="name(../.) = 'form-calendarelement'">
          <xsl:choose>
            <xsl:when test="lines/text()!=1">
              <xsl:call-template name="XmlEditorInfo" />
              <xsl:choose>
                <xsl:when test="$xe:editionMode = 'true'">
                  <textarea disabled="true">
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:attribute name="cols">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="columns/text()"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:text>15</xsl:text>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:attribute name="rows">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="lines/text()"/>
                        </xsl:when>
                        <xsl:otherwise>7</xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:value-of select="defaultvalue"/>
                  </textarea>
                </xsl:when>
                <xsl:otherwise>
                  <textarea>
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:if test="$isReadOnly = 'true'">
                      <xsl:attribute name="disabled">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="name">
                      <xsl:call-template name="NameInputForm">
                        <xsl:with-param name="name">
                          <xsl:value-of select="string(name/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="label">
                          <xsl:value-of select="string(../label/value/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="pos">
                          <xsl:value-of select="$pos" />
                        </xsl:with-param>
                      </xsl:call-template>
                    </xsl:attribute>
                    <xsl:attribute name="cols">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="columns/text()"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:text>15</xsl:text>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:attribute name="rows">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="lines/text()"/>
                        </xsl:when>
                        <xsl:otherwise>7</xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:choose>
                      <xsl:when test="$formValues">
                        <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                        <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:value-of select="defaultvalue"/>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:if test="mandatory = 'yes'">
                      <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
                    </xsl:if>
                    <xsl:if test="regexpress and regexpress/text() != ''">
                      <xsl:variable name="tmp5" select="regexpress/text()"/>
                      <xsl:variable name="tmp4" select="CM:AddFormRegExpElement(CM:GetTextFieldName(),string($tmp5))"/>
                    </xsl:if>
                  </textarea>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="XmlEditorInfo" />
              <xsl:choose>
                <xsl:when test="$xe:editionMode = 'true'">
                  <input type="text" disabled="true">
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <!--<xsl:attribute name="onfocus">return showCalendar(this,this, '"+CrossFactory.SiteNote.Components.Utils.GetPopCalendarFormat(CrossFactory.SiteNote.Components.Settings._settings.LocalDateFormat)+"', 'en', 1,-1,-1 );</xsl:attribute>-->
                    <xsl:attribute name="size">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="columns/text()"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:text>15</xsl:text>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:attribute name="value">
                      <xsl:choose>
                        <xsl:when test="string-length(defaultvalue/text()) != 0">
                          <xsl:value-of select="defaultvalue"/>
                        </xsl:when>
                        <xsl:otherwise></xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                  </input>
                </xsl:when>
                <xsl:otherwise>
                  <input type="text" readonly="true">
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:attribute name="onfocus">
                      <xsl:text>return showCalendar(this,this, 'dd/MM/yyyy', 'en', 1,-1,-1,-1);</xsl:text>
                    </xsl:attribute>
                    <xsl:if test="$isReadOnly = 'true'">
                      <xsl:attribute name="disabled">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="name">
                      <xsl:call-template name="NameInputForm">
                        <xsl:with-param name="name">
                          <xsl:value-of select="string(name/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="label">
                          <xsl:value-of select="string(../label/value/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="pos">
                          <xsl:value-of select="$pos" />
                        </xsl:with-param>
                      </xsl:call-template>
                    </xsl:attribute>
                    <xsl:attribute name="value">
                      <xsl:choose>
                        <xsl:when test="$formValues">
                          <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                          <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:if test="string-length(defaultvalue/text()) != 0">
                            <xsl:value-of select="defaultvalue"/>
                          </xsl:if>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:if test="mandatory = 'yes'">
                      <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
                    </xsl:if>
                    <xsl:if test="regexpress and regexpress/text() != ''">
                      <xsl:variable name="tmp5" select="regexpress/text()"/>
                      <xsl:variable name="tmp4" select="CM:AddFormRegExpElement(CM:GetTextFieldName(),string($tmp5))"/>
                    </xsl:if>
                  </input>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <xsl:choose>
            <xsl:when test="lines/text()!=1">
              <xsl:call-template name="XmlEditorInfo" />
              <xsl:choose>
                <xsl:when test="$xe:editionMode = 'true'">
                  <textarea disabled="true">
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:attribute name="cols">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="columns/text()"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:text>15</xsl:text>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:attribute name="rows">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="lines/text()"/>
                        </xsl:when>
                        <xsl:otherwise>7</xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:value-of select="defaultvalue"/>
                  </textarea>
                </xsl:when>
                <xsl:otherwise>
                  <textarea>
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:if test="$isReadOnly = 'true'">
                      <xsl:attribute name="disabled">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="name">
                      <xsl:call-template name="NameInputForm">
                        <xsl:with-param name="name">
                          <xsl:value-of select="string(name/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="label">
                          <xsl:value-of select="string(../label/value/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="pos">
                          <xsl:value-of select="$pos" />
                        </xsl:with-param>
                      </xsl:call-template>
                    </xsl:attribute>
                    <xsl:attribute name="cols">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="columns/text()"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:text>15</xsl:text>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:attribute name="rows">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="lines/text()"/>
                        </xsl:when>
                        <xsl:otherwise>7</xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:choose>
                      <xsl:when test="$formValues">
                        <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                        <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:value-of select="defaultvalue"/>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:if test="mandatory = 'yes'">
                      <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
                    </xsl:if>
                    <xsl:if test="regexpress and regexpress/text() != ''">
                      <xsl:variable name="tmp5" select="regexpress/text()"/>
                      <xsl:variable name="tmp4" select="CM:AddFormRegExpElement(CM:GetTextFieldName(),string($tmp5))"/>
                    </xsl:if>
                  </textarea>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="XmlEditorInfo" />
              <xsl:choose>
                <xsl:when test="$xe:editionMode = 'true'">
                  <input type="text" disabled="true">
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:attribute name="size">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="columns/text()"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:text>15</xsl:text>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:attribute name="value">
                      <xsl:choose>
                        <xsl:when test="string-length(defaultvalue/text()) != 0">
                          <xsl:value-of select="defaultvalue"/>
                        </xsl:when>
                        <xsl:otherwise></xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                  </input>
                </xsl:when>
                <xsl:otherwise>
                  <input type="text">
                    <xsl:choose>
                      <xsl:when test="mandatory = 'yes'">
                        <xsl:attribute name="class">
                          <xsl:text>forminput mandatory</xsl:text>
                        </xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">
                          <xsl:text>forminput</xsl:text>
                        </xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <xsl:if test="$isReadOnly = 'true'">
                      <xsl:attribute name="disabled">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="name">
                      <xsl:call-template name="NameInputForm">
                        <xsl:with-param name="name">
                          <xsl:value-of select="string(name/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="label">
                          <xsl:value-of select="string(../label/value/text())" />
                        </xsl:with-param>
                        <xsl:with-param name="pos">
                          <xsl:value-of select="$pos" />
                        </xsl:with-param>
                      </xsl:call-template>
                    </xsl:attribute>
                    <xsl:attribute name="size">
                      <xsl:choose>
                        <xsl:when test="string-length(columns/text()) != 0">
                          <xsl:value-of select="columns/text()"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:text>15</xsl:text>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:attribute name="value">
                      <xsl:choose>
                        <xsl:when test="$formValues">
                          <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                          <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                        </xsl:when>
                        <xsl:otherwise>
                          <xsl:if test="string-length(defaultvalue/text()) != 0">
                            <xsl:value-of select="defaultvalue"/>
                          </xsl:if>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:attribute>
                    <xsl:if test="mandatory = 'yes'">
                      <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
                    </xsl:if>
                    <xsl:if test="regexpress and regexpress/text() != ''">
                      <xsl:variable name="tmp5" select="regexpress/text()"/>
                      <xsl:variable name="tmp4" select="CM:AddFormRegExpElement(CM:GetTextFieldName(),string($tmp5))"/>
                    </xsl:if>
                  </input>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:otherwise>
      </xsl:choose>
    </td>
    <xsl:if test="br/text()='yes' and following-sibling::*[1]">
      <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;tr&gt;</xsl:text>
    </xsl:if>
  </xsl:template>


  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="filefield">
    <xsl:param name="isReadOnly"></xsl:param>
    <xsl:param name="pos">00</xsl:param>
    <xsl:if test="$xe:transformForEmail != 'true'">
      <td valign="top">
        <xsl:call-template name="XmlEditorInfo" />
        <xsl:choose>
          <xsl:when test="$xe:editionMode = 'true'">
            <input type="file" enable="false">
              <xsl:choose>
                <xsl:when test="mandatory = 'yes'">
                  <xsl:attribute name="class">
                    <xsl:text>forminput mandatory</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>forminput</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:attribute name="readonly">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </input>
          </xsl:when>
          <xsl:otherwise>
            <input type="file" runat="server">
              <xsl:choose>
                <xsl:when test="mandatory = 'yes'">
                  <xsl:attribute name="class">
                    <xsl:text>forminput mandatory</xsl:text>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="class">
                    <xsl:text>forminput</xsl:text>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
              <xsl:attribute name="name">
                <xsl:call-template name="NameInputForm">
                  <xsl:with-param name="name">
                    <xsl:value-of select="string(name/text())" />
                  </xsl:with-param>
                  <xsl:with-param name="label">
                    <xsl:value-of select="string(../label/value/text())" />
                  </xsl:with-param>
                  <xsl:with-param name="pos">
                    <xsl:value-of select="$pos" />
                  </xsl:with-param>
                </xsl:call-template>
              </xsl:attribute>
              <xsl:if test="$isReadOnly = 'true'">
                <xsl:attribute name="disabled">
                  <xsl:text>true</xsl:text>
                </xsl:attribute>
              </xsl:if>
            </input>
            <xsl:if test="mandatory = 'yes'">
              <xsl:variable name="tmp2" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
      </td>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="customobj">
    <td valign="top">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">--Custom--</xsl:when>
        <xsl:otherwise>--Custom--</xsl:otherwise>
      </xsl:choose>
    </td>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="listbox">
    <xsl:param name="isReadOnly"></xsl:param>
    <xsl:param name="pos">00</xsl:param>
    <td valign="top">
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <table cellpadding="0" cellspacing="0" border="0">
            <xsl:call-template name="XmlEditorInfo"/>
            <tr>
              <td>
                <table cellpadding="0" cellspacing="0" border="0">
                  <xsl:attribute name="class">
                    <xsl:text>forminput2</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="size">
                    <xsl:value-of select="lines/text()"/>
                  </xsl:attribute>
                  <xsl:for-each select="value">
                    <tr>
                      <xsl:choose>
                        <xsl:when test="checked/text()='no'">
                          <td class="formtext">
                            <xsl:call-template name="XmlEditorInfo" />
                            <xsl:apply-templates select="."/>
                          </td>
                        </xsl:when>
                        <xsl:otherwise>
                          <td class="formtextselected">
                            <xsl:call-template name="XmlEditorInfo" />
                            <xsl:apply-templates select="."/>
                          </td>
                        </xsl:otherwise>
                      </xsl:choose>
                    </tr>
                  </xsl:for-each>
                </table>
              </td>
            </tr>
            <tr>
              <td height="3">
                <img src="{$applicationPath}Images/Transp.gif" width="40" height="3"/>
              </td>
            </tr>
          </table>
        </xsl:when>
        <xsl:otherwise>
          <select multiple="true">
            <xsl:if test="$isReadOnly = 'true'">
              <xsl:attribute name="disabled">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputForm">
                <xsl:with-param name="name">
                  <xsl:value-of select="string(name/text())" />
                </xsl:with-param>
                <xsl:with-param name="label">
                  <xsl:value-of select="string(../label/value/text())" />
                </xsl:with-param>
                <xsl:with-param name="pos">
                  <xsl:value-of select="$pos" />
                </xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:attribute name="size">
              <xsl:choose>
                <xsl:when test="lines != ''">
                  <xsl:value-of select="lines/text()"/>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:value-of select="count(value)"/>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:attribute>
            <xsl:choose>
              <xsl:when test="$formValues">
                <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                <xsl:variable name="tmp3" select="CM:GetValue($tmp2, $formValues)"/>
                <xsl:for-each select="value">
                  <option>
                    <xsl:if test="contains($tmp3, text)">
                      <xsl:attribute name="selected">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="value">
                      <xsl:apply-templates select="text"/>
                    </xsl:attribute>
                    <xsl:apply-templates select="text"/>
                  </option>
                </xsl:for-each>
              </xsl:when>
              <xsl:otherwise>
                <xsl:for-each select="value">
                  <option>
                    <xsl:if test="checked/text()='yes'">
                      <xsl:attribute name="selected">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="value">
                      <xsl:apply-templates select="text"/>
                    </xsl:attribute>
                    <xsl:apply-templates select="text"/>
                  </option>
                </xsl:for-each>
              </xsl:otherwise>
            </xsl:choose>
          </select>
          <xsl:if test="mandatory = 'yes'">
            <xsl:variable name="tmp4" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
          </xsl:if>
        </xsl:otherwise>
      </xsl:choose>
    </td>
    <xsl:if test="br/text()='yes' and following-sibling::*[1]">
      <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;tr&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="steplistbox">
    <td valign="top">
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <table cellpadding="0" cellspacing="0" border="0">
            <xsl:call-template name="XmlEditorInfo"/>
            <tr>
              <td>
                <table cellpadding="0" cellspacing="0" border="0">
                  <xsl:if test="../display/text()!='dropdown'">
                    <xsl:attribute name="class">
                      <xsl:text>forminput2</xsl:text>
                    </xsl:attribute>
                  </xsl:if>
                  <xsl:attribute name="size">
                    <xsl:value-of select="lines/text()"/>
                  </xsl:attribute>
                  <xsl:if test="../display/text()='dropdown'">
                    <tr>
                      <td height="22" width="100%" background="{$applicationPath}Images/Form/dropdownBG.gif">
                        <img src="{$applicationPath}Images/Form/dropdownLeftImg.gif" width="6" height="22"/>
                      </td>
                      <td height="22">
                        <img src="{$applicationPath}Images/Form/dropdownRightImg.gif" width="18" height="22"/>
                      </td>
                    </tr>
                  </xsl:if>
                  <xsl:for-each select="steplistboxvalue">
                    <tr>
                      <xsl:choose>
                        <xsl:when test="checked/text()='no'">
                          <td class="formtext">
                            <xsl:call-template name="XmlEditorInfo" />
                            <xsl:apply-templates select="./text"/>
                          </td>
                        </xsl:when>
                        <xsl:otherwise>
                          <td class="formtextselected">
                            <xsl:call-template name="XmlEditorInfo" />
                            <xsl:apply-templates select="./text"/>
                          </td>
                        </xsl:otherwise>
                      </xsl:choose>
                    </tr>
                  </xsl:for-each>
                </table>
              </td>
            </tr>
            <tr>
              <td height="3">
                <img src="{$applicationPath}Images/Transp.gif" width="40" height="3"/>
              </td>
            </tr>
          </table>
        </xsl:when>
        <xsl:otherwise>
          <xsl:choose>
            <xsl:when test="../display/text()='dropdown'">
              <xsl:attribute name="class">
                <xsl:text>ddlRecipient</xsl:text>
              </xsl:attribute>
              <select>
                <xsl:attribute name="name">
                  <xsl:call-template name="NameInputFormStep">
                    <xsl:with-param name="name">
                      <xsl:if test="string-length(string(name/text())) != 0">
                        <xsl:text>step_</xsl:text><xsl:value-of select="string(name/text())" />
                      </xsl:if>
                    </xsl:with-param>
                    <xsl:with-param name="label">
                      <xsl:if test="string-length(string(../label/value/text())) != 0">
                        <xsl:text>step_</xsl:text><xsl:value-of select="string(../label/value/text())" />
                      </xsl:if>
                    </xsl:with-param>
                    <xsl:with-param name="pos">
                      <xsl:value-of select="position()" />
                    </xsl:with-param>
                  </xsl:call-template>
                </xsl:attribute>
                <xsl:attribute name="size">
                  <xsl:if test="lines != ''">
                    <xsl:value-of select="lines/text()"/>
                  </xsl:if>
                </xsl:attribute>
                <xsl:for-each select="steplistboxvalue">
                  <option>
                    <xsl:if test="checked/text()='yes' or count(../steplistboxvalue) = 1">
                      <xsl:attribute name="selected">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="value">
                      <xsl:apply-templates select="./steprealvalue"/>
                    </xsl:attribute>
                    <xsl:apply-templates select="./text"/>
                  </option>
                </xsl:for-each>
              </select>
            </xsl:when>
            <xsl:otherwise>
              <select multiple="true">
                <xsl:attribute name="size">
                  <xsl:choose>
                    <xsl:when test="lines != ''">
                      <xsl:value-of select="lines/text()"/>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="count(value)"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:attribute>
                <xsl:attribute name="name">
                  <xsl:call-template name="NameInputFormStep">
                    <xsl:with-param name="name">
                      <xsl:if test="string-length(string(name/text())) != 0">
                        <xsl:text>step_</xsl:text><xsl:value-of select="string(name/text())" />
                      </xsl:if>
                    </xsl:with-param>
                    <xsl:with-param name="label">
                      <xsl:if test="string-length(string(../label/value/text())) != 0">
                        <xsl:text>step_</xsl:text><xsl:value-of select="string(../label/value/text())" />
                      </xsl:if>
                    </xsl:with-param>
                    <xsl:with-param name="pos">
                      <xsl:value-of select="position()" />
                    </xsl:with-param>
                  </xsl:call-template>
                </xsl:attribute>
                <xsl:for-each select="steplistboxvalue">
                  <option>
                    <xsl:if test="checked/text()='yes' or count(../steplistboxvalue) = 1">
                      <xsl:attribute name="selected">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="value">
                      <xsl:apply-templates select="./steprealvalue"/>
                    </xsl:attribute>
                    <xsl:apply-templates select="./text"/>
                  </option>
                </xsl:for-each>
              </select>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:if test="mandatory = 'yes'">
            <xsl:variable name="tmp4" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
          </xsl:if>
        </xsl:otherwise>
      </xsl:choose>
    </td>
    <xsl:if test="br/text()='yes' and following-sibling::*[1]">
      <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;tr&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="dropdown">
    <xsl:param name="isReadOnly"></xsl:param>
    <xsl:param name="pos">00</xsl:param>
    <td valign="top">
      <xsl:call-template name="XmlEditorInfo"/>
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="22" width="100%" background="{$applicationPath}Images/Form/dropdownBG.gif">
                <img src="{$applicationPath}Images/Form/dropdownLeftImg.gif" width="6" height="22"/>
              </td>
              <td height="22">
                <img src="{$applicationPath}Images/Form/dropdownRightImg.gif" width="18" height="22"/>
              </td>
            </tr>
            <tr>
              <td colspan="2">
                <table cellpadding="0" cellspacing="0" border="0">
                  <xsl:attribute name="class">
                    <xsl:text>forminput2</xsl:text>
                  </xsl:attribute>
                  <xsl:for-each select="value">
                    <tr>
                      <xsl:choose>
                        <xsl:when test="checked/text()='no'">
                          <td class="formtext">
                            <xsl:call-template name="XmlEditorInfo" />
                            <xsl:apply-templates select="."/>
                          </td>
                        </xsl:when>
                        <xsl:otherwise>
                          <td class="formtextselected">
                            <xsl:call-template name="XmlEditorInfo" />
                            <xsl:apply-templates select="."/>
                          </td>
                        </xsl:otherwise>
                      </xsl:choose>
                    </tr>
                  </xsl:for-each>
                </table>
              </td>
            </tr>
          </table>
        </xsl:when>
        <xsl:otherwise>
          <select>
            <xsl:if test="$isReadOnly = 'true'">
              <xsl:attribute name="disabled">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputForm">
                <xsl:with-param name="name">
                  <xsl:value-of select="string(name/text())" />
                </xsl:with-param>
                <xsl:with-param name="label">
                  <xsl:value-of select="string(../label/value/text())" />
                </xsl:with-param>
                <xsl:with-param name="pos">
                  <xsl:value-of select="$pos" />
                </xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:choose>
              <xsl:when test="$formValues">
                <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                <xsl:variable name="tmp3" select="CM:GetValue($tmp2, $formValues)"/>
                <xsl:for-each select="value">
                  <option>
                    <xsl:if test="$tmp3=text">
                      <xsl:attribute name="selected">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="value">
                      <xsl:apply-templates select="text"/>
                    </xsl:attribute>
                    <xsl:apply-templates select="text"/>
                  </option>
                </xsl:for-each>
              </xsl:when>
              <xsl:otherwise>
                <xsl:for-each select="value">
                  <option>
                    <xsl:if test="checked/text()='yes'">
                      <xsl:attribute name="selected">
                        <xsl:text>true</xsl:text>
                      </xsl:attribute>
                    </xsl:if>
                    <xsl:attribute name="value">
                      <xsl:apply-templates select="text"/>
                    </xsl:attribute>
                    <xsl:apply-templates select="text"/>
                  </option>
                </xsl:for-each>
              </xsl:otherwise>
            </xsl:choose>
          </select>
          <xsl:if test="mandatory = 'yes'">
            <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
          </xsl:if>
        </xsl:otherwise>
      </xsl:choose>
    </td>
    <td></td>
    <xsl:if test="br/text()='yes' and following-sibling::*[1]">
      <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;tr&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="text">
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
      <xsl:value-of select="$xe:labels/label[name = 'formtext']/*[name(.) = $xe:userLanguage]/text()"/>
    </xsl:if>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="radiobutton/text">
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
      <xsl:value-of select="$xe:labels/label[name = 'value']/*[name(.) = $xe:userLanguage]/text()"/>
    </xsl:if>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="checkbox/text">
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
      <xsl:value-of select="$xe:labels/label[name = 'value']/*[name(.) = $xe:userLanguage]/text()"/>
    </xsl:if>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="form-hiddenelement/text">
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
      <xsl:value-of select="$xe:labels/label[name = 'hiddenelement']/*[name(.) = $xe:userLanguage]/text()"/>
    </xsl:if>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="value/text">
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
      <xsl:value-of select="$xe:labels/label[name = 'value']/*[name(.) = $xe:userLanguage]/text()"/>
    </xsl:if>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="steplistboxvalue/text">
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:choose>
      <xsl:when test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'steplistboxvalue']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates />
      </xsl:otherwise>
    </xsl:choose>
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="label/value">
    <xsl:call-template name="XmlEditorStartTextBlock"/>
    <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
      <xsl:value-of select="$xe:labels/label[name = 'formlabel']/*[name(.) = $xe:userLanguage]/text()"/>
    </xsl:if>
    <xsl:apply-templates />
    <xsl:call-template name="XmlEditorEndTextBlock" />
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="form-hiddenelement">
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true'">
        <span class="hiddenelement">
          <xsl:call-template name="XmlEditorInfo" />
          <xsl:apply-templates select="text" />
        </span>
        <br/>
      </xsl:when>
      <xsl:otherwise>
        <input type="hidden">
          <xsl:attribute name="name">
            <xsl:call-template name="NameInputForm">
              <xsl:with-param name="name">
                <xsl:value-of select="string(name/text())" />
              </xsl:with-param>
              <xsl:with-param name="label">
                <xsl:apply-templates select="text/text()" />
              </xsl:with-param>
            </xsl:call-template>
          </xsl:attribute>
          <xsl:attribute name="value">
            <xsl:value-of select="text/text()"/>
          </xsl:attribute>
        </input>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="checkbox">
    <xsl:param name="isReadOnly"></xsl:param>
    <xsl:param name="pos">00</xsl:param>

    <td valign="top" align="left" style="padding-left:2px;">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'false'">
          <input type="checkbox">
            <xsl:if test="$isReadOnly = 'true'">
              <xsl:attribute name="disabled">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputForm">
                <xsl:with-param name="name">
                  <xsl:value-of select="string(name/text())" />
                </xsl:with-param>
                <xsl:with-param name="label">
                  <xsl:value-of select="string(../label/value/text())" />
                </xsl:with-param>
                <xsl:with-param name="pos">
                  <xsl:value-of select="$pos" />
                </xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:attribute name="value">1</xsl:attribute>
            <!-- checked or not -->
            <xsl:choose>
              <xsl:when test="$formValues">
                <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                <xsl:variable name="tmp3" select="CM:GetValue($tmp2, $formValues)"/>
                <xsl:if test="$tmp3 != ''">
                  <xsl:attribute name="checked"/>
                </xsl:if>
              </xsl:when>
              <xsl:otherwise>
                <xsl:if test="checked/text() = 'yes'">
                  <xsl:attribute name="checked"/>
                </xsl:if>
              </xsl:otherwise>
            </xsl:choose>
          </input>
          <span class="formtext">
            <xsl:apply-templates select="text" />
          </span>
          <xsl:if test="br/text()='yes'">
            <br/>
          </xsl:if>
        </xsl:when>
        <xsl:otherwise>
          <input type="checkbox">
            <xsl:if test="checked/text() = 'yes'">
              <xsl:attribute name="checked"/>
            </xsl:if>
          </input>
          <span class="formtext">
            <xsl:apply-templates select="text" />
          </span>
          <xsl:if test="br/text()='yes'">
            <br/>
          </xsl:if>
        </xsl:otherwise>
      </xsl:choose>
    </td>
    <xsl:if test="br/text()='yes' and following-sibling::*[1]">
      <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;tr&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="radiobuttongroup">
    <xsl:param name="pos">00</xsl:param>
    <td valign="top">
      <xsl:call-template name="XmlEditorInfo" />
      <table>
        <tr>
          <td>
            <xsl:apply-templates select="radiobutton">
              <xsl:with-param name="pos">
                <xsl:value-of select="$pos" />
              </xsl:with-param>
              <xsl:with-param name="currentpos">
                <xsl:value-of select="position()" />
              </xsl:with-param>
            </xsl:apply-templates>
          </td>
        </tr>
        <tr>
          <td>
            <img src="{$applicationPath}Images/Transp.gif" height="2" width="1"/>
          </td>
        </tr>
      </table>
    </td>
    <xsl:if test="br/text()='yes' and following-sibling::*[1]">
      <xsl:text disable-output-escaping="yes">&lt;/tr&gt;&lt;tr&gt;</xsl:text>
    </xsl:if>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="radiobutton">
    <xsl:param name="isReadOnly"></xsl:param>
    <xsl:param name="pos">00</xsl:param>
    <xsl:param name="currentpos">00</xsl:param>
    <span>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'false'">
          <input type="radio" class="formvalue">
            <xsl:if test="$isReadOnly = 'true'">
              <xsl:attribute name="disabled">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputFormNoCounter">
                <xsl:with-param name="name">
                  <xsl:value-of select="string(../../name/text())" />
                </xsl:with-param>
                <xsl:with-param name="label">
                  <xsl:value-of select="string(../../label/value/text())" />
                </xsl:with-param>
                <xsl:with-param name="pos">
                  <xsl:value-of select="$pos" />
                </xsl:with-param>
                <xsl:with-param name="currentpos">
                  <xsl:value-of select="$currentpos" />
                </xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:attribute name="value">
              <xsl:value-of select="text/text()"/>
            </xsl:attribute>
            <xsl:choose>
              <xsl:when test="$formValues">
                <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                <xsl:variable name="tmp3" select="CM:GetValue($tmp2, $formValues)"/>
                <xsl:if test="$tmp3 = text/text()">
                  <xsl:attribute name="checked"/>
                </xsl:if>
              </xsl:when>
              <xsl:otherwise>
                <xsl:if test="checked/text() = 'yes'">
                  <xsl:attribute name="checked"/>
                </xsl:if>
              </xsl:otherwise>
            </xsl:choose>
          </input>
          <xsl:if test="../mandatory = 'yes'">
            <xsl:variable name="tmp4" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
          </xsl:if>
          <span class="formtext">
            <xsl:apply-templates select="text" />
          </span>
        </xsl:when>
        <xsl:otherwise>
          <input type="radio">
            <xsl:attribute name="name">
              <xsl:value-of select="../name/text()"/>
            </xsl:attribute>
            <xsl:if test="checked/text() = 'yes'">
              <xsl:attribute name="checked"/>
            </xsl:if>
          </input>
          <span class="formtext">
            <xsl:apply-templates select="text" />
          </span>
        </xsl:otherwise>
      </xsl:choose>
    </span>
    <xsl:choose>
      <xsl:when test="br/text()='yes'">
        <br/>
      </xsl:when>
      <xsl:otherwise></xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="form-labelwidth"></xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template name="splitFormEmail">
    <xsl:param name="string" />
    <xsl:param name="delimiter" select="';'" />
    <xsl:choose>
      <xsl:when test="$delimiter and contains($string, $delimiter)">
        <option>
          <xsl:value-of select="substring-before($string, $delimiter)" />
        </option>
        <xsl:call-template name="splitFormEmail">
          <xsl:with-param name="string" select="substring-after($string, $delimiter)" />
          <xsl:with-param name="delimiter" select="$delimiter" />
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <option>
          <xsl:value-of select="$string" />
        </option>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="form-submitbutton">
    <xsl:if test="$xe:transformForEmail != 'true' and $xe:showSubmit != 'false' and $viewingMode != 'true'">
      <xsl:text disable-output-escaping="yes">&lt;!--contentcaching.off--&gt;</xsl:text>
      <table border="0" cellpadding="0" cellspacing="0" width="100%" height="21">
        <xsl:call-template name="XmlEditorInfo" />
        <tr>
          <td border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
            <table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td>
                  <xsl:choose>
                    <xsl:when test="$xe:editionMode = 'false'">
                      <xsl:call-template name="ServerControlSubmitButton">
                        <xsl:with-param name="buttonText" select="btn-name/text()"/>
                        <xsl:with-param name="buttonLinkSucceed" select="hrefsucceed/text()"/>
                        <xsl:with-param name="buttonLinkError" select="hreferror/text()"/>
                        <xsl:with-param name="autoReply" select="autoReply/text()"/>
                        <xsl:with-param name="mailSender" select="mailSender/text()"/>
                        <xsl:with-param name="mailSubject" select="mailSubject/text()"/>
                        <xsl:with-param name="mailHeader" select="mailHeader/text()"/>
                        <xsl:with-param name="mailDescription" select="mailDescription/text()"/>
                        <xsl:with-param name="mailSign" select="mailSign/text()"/>
                      </xsl:call-template>
                    </xsl:when>
                    <xsl:otherwise>
                      <xsl:apply-templates select="btn-name" />
                    </xsl:otherwise>
                  </xsl:choose>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </xsl:if>
  </xsl:template>

  <xsl:template match="form-submitbutton/btn-name">
    <xsl:call-template name="XmlEditorInfo" />
    <td>
      <img src="{$applicationPath}Images/Form/SubmitButtonImgLeft.gif" width="17" height="21"/>
    </td>
    <td class="txt" background="{$applicationPath}Images/Form/SubmitButtonBG.gif">
      <xsl:call-template name="XmlEditorStartTextBlock"/>
      <xsl:value-of select="text()"/>
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'formsubmit']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </td>
    <td>
      <img src="{$applicationPath}Images/Form/SubmitButtonImgRight.gif" width="17" height="21"/>
    </td>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template name="ServerControlCalendar">
    <xsl:call-template name="XmlEditorStartServerControlBlock"/>
    <type>CrossFactory.SiteNote.Controls.Calendar, CrossFactory.SiteNote3_0</type>
    <property>
      <name>XmlFieldsInfos</name>
      <value>
        <xsl:value-of select="CM:GetAllFormElementsNames()"/>
      </value>
    </property>
    <property>
      <name>ContentXmlInfo</name>
      <value>
        <xsl:value-of select="$xe:contentXmlInfo"/>
      </value>
    </property>
    <property>
      <name>ContentXslInfo</name>
      <value>
        <xsl:value-of select="$xe:contentXslInfo"/>
      </value>
    </property>
    <property>
      <name>CurrentStep</name>
      <value>
        <xsl:value-of select="$currentStep"/>
      </value>
    </property>
    <xsl:call-template name="XmlEditorEndServerControlBlock"/>
  </xsl:template>


  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template name="ServerControlSubmitButton">
    <xsl:param name="buttonText"/>
    <xsl:param name="buttonLinkSucceed"/>
    <xsl:param name="buttonLinkError"/>
    <xsl:param name="defaultBaseUrl"></xsl:param>
    <xsl:param name="autoReply"/>
    <xsl:param name="mailSender"/>
    <xsl:param name="mailSubject"/>
    <xsl:param name="mailHeader"/>
    <xsl:param name="mailDescription"/>
    <xsl:param name="mailSign"/>
    <xsl:call-template name="XmlEditorStartServerControlBlock"/>
    <type>CrossFactory.SiteNote.Controls.SubmitButton, CrossFactory.SiteNote3_0</type>
    <property>
      <name>XmlFieldsInfos</name>
      <value>
        <xsl:value-of select="CM:GetAllFormElementsNames()"/>
      </value>
    </property>
    <property>
      <name>ContentXmlInfo</name>
      <value>
        <xsl:value-of select="$xe:contentXmlInfo"/>
      </value>
    </property>
    <property>
      <name>ContentXslInfo</name>
      <value>
        <xsl:value-of select="$xe:contentXslInfo"/>
      </value>
    </property>
    <xsl:if test="$defaultBaseUrl != ''">
      <property>
        <name>DefaultBaseUrl</name>
        <value>
          <xsl:value-of select="$defaultBaseUrl"/>
        </value>
      </property>
    </xsl:if>
    <property>
      <name>ButtonName</name>
      <value>
        <xsl:value-of select="$buttonText"/>
      </value>
    </property>
    <property>
      <name>ButtonLinkSucceed</name>
      <value>
        <xsl:value-of select="$buttonLinkSucceed"/>
      </value>
    </property>
    <property>
      <name>ButtonLinkError</name>
      <value>
        <xsl:value-of select="$buttonLinkError"/>
      </value>
    </property>
    <property>
      <name>AutoReply</name>
      <value>
        <xsl:value-of select="$autoReply"/>
      </value>
    </property>
    <property>
      <name>MailSender</name>
      <value>
        <xsl:value-of select="$mailSender"/>
      </value>
    </property>
    <property>
      <name>MailSubject</name>
      <value>
        <xsl:value-of select="$mailSubject"/>
      </value>
    </property>
    <property>
      <name>MailHeader</name>
      <value>
        <xsl:value-of select="$mailHeader"/>
      </value>
    </property>
    <property>
      <name>MailDescription</name>
      <value>
        <xsl:value-of select="$mailDescription"/>
      </value>
    </property>
    <property>
      <name>MailSign</name>
      <value>
        <xsl:value-of select="$mailSign"/>
      </value>
    </property>
    <property>
      <name>XmlEditorXmlId</name>
      <value>
        <xsl:value-of select="$xe:xmlEditorXmlId"/>
      </value>
    </property>
    <property>
      <name>MandatoryFieldId</name>
      <value>
        <xsl:value-of select="CM:GetAllFormMandatoryElement()"/>
      </value>
    </property>
    <property>
      <name>RegExpFieldId</name>
      <value>
        <xsl:value-of select="CM:GetAllFormRegExpElement()"/>
      </value>
    </property>
    <property>
      <name>CurrentStep</name>
      <value>
        <xsl:value-of select="$currentStep"/>
      </value>
    </property>
    <xsl:call-template name="XmlEditorEndServerControlBlock"/>
  </xsl:template>


  
  
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx LINKS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="links">
    <div id="linksBloc">

      <xsl:call-template name="XmlEditorInfo" />
      <xsl:if test="$xe:editionMode = 'true'">
        <xsl:attribute name="style">
          <xsl:text>padding-top:5px;padding-bottom:5px;</xsl:text>
      </xsl:attribute>
      </xsl:if>
      <ul class="linksList">
        <xsl:apply-templates select="link" />
      </ul>
      <xsl:if test="count(link) = 0">
        <img src="{$applicationPath}Images/Transp.gif" width="10" height="50" />
      </xsl:if>
    </div>
  </xsl:template>


  <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->

  <xsl:template match="link">
    <xsl:variable name="hr" select="CM:GetUrl($applicationPath, $xe:contentLanguage, $hierarchy, href/text())"/>
    <li>
      <xsl:call-template name="XmlEditorInfo" />
      <a>
        <xsl:call-template name="XmlEditorCancelClick">
          <xsl:with-param name="tooltip">
            <xsl:value-of select="tooltip/text()" />
          </xsl:with-param>
        </xsl:call-template>
        <xsl:if test="$xe:editionMode = 'true'">
          <xsl:attribute name="xe:nodeName">
            <xsl:text>hyperlink</xsl:text>
        </xsl:attribute>
          <xsl:attribute name="xe:hyperlinkType">
            <xsl:value-of select="@xe:hyperlinkType"/>
          </xsl:attribute>
          <xsl:attribute name="xe:realUrl">
            <xsl:value-of select="href/text()"/>
          </xsl:attribute>
        </xsl:if>
        <xsl:choose>
          <xsl:when test="linkanchor[string-length(text()) != 0]">
            <xsl:choose>
              <xsl:when test="$hr != ''">
                <xsl:attribute name="href">
                  <xsl:value-of select="$hr"/>
                  <xsl:text>#</xsl:text><xsl:value-of select="linkanchor/text()"/>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="href">
                  <xsl:value-of select="href/text()"/>
                  <xsl:text>#</xsl:text><xsl:value-of select="linkanchor/text()"/>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:when>
          <xsl:otherwise>
            <xsl:choose>
              <xsl:when test="$hr != ''">
                <xsl:attribute name="href">
                  <xsl:value-of select="$hr"/>
                </xsl:attribute>
              </xsl:when>
              <xsl:otherwise>
                <xsl:attribute name="href">
                  <xsl:value-of select="href/text()"/>
                </xsl:attribute>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:attribute name="target">
          <xsl:value-of select="target" />
        </xsl:attribute>
        <div class="linktext">
          <xsl:value-of select="linklabel/text()" />
        </div>
        <div class="linkimg">
          <xsl:apply-templates select="picture" />
        </div>
      </a>
    </li>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FAQ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="FAQcontent">
    <div class="faqContent">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="entry"/>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="entry">
    <table>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="question">
        <xsl:with-param name="pos">
          <xsl:value-of select="position()"></xsl:value-of>
        </xsl:with-param>
      </xsl:apply-templates>

      <xsl:apply-templates select="answer">
        <xsl:with-param name="pos">
          <xsl:value-of select="position()"></xsl:value-of>
        </xsl:with-param>
      </xsl:apply-templates>
    </table>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="question">
    <xsl:param name="pos"/>
    <tr>
      <xsl:if test="$xe:editionMode = 'false'">
        <xsl:attribute name="onclick">
          <xsl:text>showhide('answer_</xsl:text>
          <xsl:value-of select="$pos" />
          <xsl:text>')</xsl:text>
        </xsl:attribute>
      </xsl:if>
      <td class="FaqLabelQuestion">
        <xsl:if test="../anchor and string-length(../anchor/text()) > 0">
          <a>
            <xsl:attribute name="name">
              <xsl:value-of select="../anchor/text()" />
            </xsl:attribute>
            <img border="0" src="{$applicationPath}Images/Transp.gif" width="1" height="1" style="display:none" />
          </a>
        </xsl:if>
        <xsl:call-template name="XmlEditorInfo" />
        <xsl:call-template name="XmlEditorStartTextBlock" />
        <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
          <xsl:value-of select="$xe:labels/label[name = 'question']/*[name(.) = $xe:userLanguage]/text()"/>
        </xsl:if>
        <xsl:apply-templates />
        <xsl:call-template name="XmlEditorEndTextBlock" />
      </td>
    </tr>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="answer">
    <xsl:param name="pos"/>
    <tr>
      <xsl:if test="$xe:editionMode = 'false'">
        <xsl:attribute name="style">
          <xsl:text>display:none</xsl:text>
        </xsl:attribute>
      </xsl:if>
      <xsl:attribute name="id">
        <xsl:text>answer_</xsl:text>
        <xsl:value-of select="$pos"></xsl:value-of>
      </xsl:attribute>
      <td width="400" class="FaqLabelAnswer">
        <xsl:apply-templates />
      </td>
    </tr>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EVENT xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->


  <xsl:template match="Eventcontent">
    <div class="eventContent">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:if test="$xe:editionMode = 'true'">
        <img border="0" src="{$applicationPath}Images/Transp.gif" width="100%" height="3px" />
      </xsl:if>
      <xsl:apply-templates select="event"/>
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="event">
    <div class="eventContainer" valign="top">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:apply-templates select="dateEvent" />
      <xsl:apply-templates select="eventTitle" />
      <xsl:apply-templates select="eventText" />
      <div>
        <xsl:apply-templates select="section" />
      </div>
      <hr class="horizontalline" />
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="dateEvent">
    <div class="dateEvent">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'dateEvent']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </div>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="eventTitle">
    <p class="eventTitle">
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'eventTitle']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </p>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="eventText">
    <p class="eventText">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock">
        <xsl:with-param name="allowEnter">yes</xsl:with-param>
      </xsl:call-template>
      <xsl:if test="$xe:labels and string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'eventText']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:value-of select="." disable-output-escaping="yes" />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </p>
  </xsl:template>


  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEWS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="newscontent">
    <table border="0" width="95%" cellpadding="3" cellspacing="0">
      <xsl:call-template name="XmlEditorInfo" />
      <tr>
        <td>
          <img src="{$applicationPath}Images/transp.gif" width="100" height="3" />
        </td>
      </tr>
      <tr>
        <td width="100%">
          <xsl:apply-templates select="news"/>
        </td>
      </tr>
    </table>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="news">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
      <xsl:call-template name="XmlEditorInfo" />
      <tr>
        <td background="{$applicationPath}Images/CommonContent/DashedLine.gif" width="100%">
          <img src="{$applicationPath}Images/transp.gif" width="1" height="1"/>
        </td>
      </tr>
      <tr>
        <td height="100%" valign="top" width="100%">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <xsl:apply-templates select="newstitle"/>
            <tr>
              <td width="61" valign="top">
                <xsl:apply-templates select="picture"/>
              </td>
              <td width="100%" class="HPtext" valign="top">
                <xsl:apply-templates select="newstext"/>
              </td>
            </tr>
            <tr>
              <td colspan="2" align="right" style="PADDING-BOTTOM:5px" width="100%">
                <xsl:apply-templates select="linkmore"/>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="news[position()='1']">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
      <xsl:call-template name="XmlEditorInfo" />
      <tr>
        <td height="100%" valign="top" width="100%">
          <table border="0" cellpadding="0" cellspacing="0" ID="Table11" width="100%">
            <xsl:apply-templates select="newstitle"/>
            <tr>
              <td width="61" valign="top">
                <xsl:apply-templates select="picture"/>
              </td>
              <td width="100%" class="HPtext" valign="top">
                <xsl:apply-templates select="newstext"/>
              </td>
            </tr>
            <tr>
              <td colspan="2" align="right" style="PADDING-BOTTOM:5px" width="100%">
                <xsl:apply-templates select="linkmore"/>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </xsl:template>


  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="newstitle">
    <tr>
      <td colspan="2" class="newshptitle">
        <xsl:call-template name="XmlEditorInfo" />
        <xsl:call-template name="XmlEditorStartTextBlock" />
        <xsl:if test="string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
          <xsl:value-of select="$xe:labels/label[name = 'newstitle']/*[name(.) = $xe:userLanguage]/text()"/>
        </xsl:if>
        <xsl:apply-templates />
        <xsl:call-template name="XmlEditorEndTextBlock" />
      </td>
    </tr>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="newstext">
    <span>
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:call-template name="XmlEditorStartTextBlock" />
      <xsl:if test="string-length(translate(text(), ' ', '')) = 0 and string-length(translate(stylerule/text(), ' ', '')) = 0 and string-length(translate(hyperlink/text(), ' ', '')) = 0">
        <xsl:value-of select="$xe:labels/label[name = 'paragraph']/*[name(.) = $xe:userLanguage]/text()"/>
      </xsl:if>
      <xsl:apply-templates />
      <xsl:call-template name="XmlEditorEndTextBlock" />
    </span>
  </xsl:template>
  

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FORM USERELEMENT xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <!-- ***************************************************************************************************** -->

  <xsl:template match="form-userelement">
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:variable name="isReadOnly" select="CM:ContaintStep(concat($readonlyParent, ',', string(./readonly/text())), string($currentStep))" />
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true' and count(//form-stepelement) &gt; 1">
        <fieldset style="padding:5px;">
          <legend class="formtext">
            <xsl:choose>
              <xsl:when test="./step/text() != ''">
                <xsl:value-of select="./step/text()" />
              </xsl:when>
              <xsl:otherwise>*</xsl:otherwise>
            </xsl:choose>
          </legend>
          <span style="padding:4px">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <xsl:call-template name="XmlEditorInfo" />
              <tr>
                <xsl:apply-templates select="form-userelementName">
                  <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                </xsl:apply-templates>
              </tr>
              <tr>
                <td colspan="2">
                  <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
                </td>
              </tr>
              <tr>
                <xsl:apply-templates select="form-userelementEmail">
                  <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                </xsl:apply-templates>
              </tr>
              <tr>
                <td colspan="2">
                  <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
                </td>
              </tr>
              <tr>
                <xsl:apply-templates select="form-userelementPassword">
                  <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                </xsl:apply-templates>
              </tr>
              <tr>
                <td colspan="2">
                  <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
                </td>
              </tr>
              <tr>
                <xsl:apply-templates select="form-userelementConfirmPassword">
                  <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                </xsl:apply-templates>
              </tr>
              <tr>
                <td colspan="2">
                  <input type="hidden" name="_UserForm_ErrorConfirmPassword">
                    <xsl:attribute name="value">
                      <xsl:value-of select="errorMsgConfirmPassword/text()" />
                    </xsl:attribute>
                  </input>
                </td>
              </tr>
              <tr>
                <td colspan="2">
                  <input type="hidden" name="_UserForm_ErrorLoginExist">
                    <xsl:attribute name="value">
                      <xsl:value-of select="errorMsgLoginExist/text()" />
                    </xsl:attribute>
                  </input>
                </td>
              </tr>
              <xsl:if test="errorMsgEmailExist">
                <tr>
                  <td colspan="2">
                    <input type="hidden" name="_UserForm_ErrorEmailExist">
                      <xsl:attribute name="value">
                        <xsl:value-of select="errorMsgEmailExist/text()" />
                      </xsl:attribute>
                    </input>
                  </td>
                </tr>
              </xsl:if>
              <tr>
                <td colspan="2">
                  <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
                </td>
              </tr>
            </table>
          </span>
        </fieldset>
      </xsl:when>
      <!--<xsl:when test="$xe:editionMode = 'true' or $steplower = '' or $steplower = $currentStep">-->
      <xsl:when test="$xe:editionMode = 'true' or $isVisibleStep = '' or $isVisibleStep = 'true'">
        <span style="padding:4px">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <xsl:call-template name="XmlEditorInfo" />
            <tr>
              <xsl:apply-templates select="form-userelementName">
                <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
              </xsl:apply-templates>
            </tr>
            <tr>
              <td colspan="2">
                <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
              </td>
            </tr>
            <tr>
              <xsl:apply-templates select="form-userelementEmail">
                <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
              </xsl:apply-templates>
            </tr>
            <tr>
              <td colspan="2">
                <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
              </td>
            </tr>
            <tr>
              <xsl:apply-templates select="form-userelementPassword">
                <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
              </xsl:apply-templates>
            </tr>
            <tr>
              <td colspan="2">
                <img src="{$applicationPath}Images/Transp.gif" height="5" width="1"/>
              </td>
            </tr>
            <tr>
              <xsl:apply-templates select="form-userelementConfirmPassword">
                <xsl:with-param name="readonlyParent" select="$readonlyParent" />
                <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
              </xsl:apply-templates>
            </tr>
            <tr>
              <td colspan="2">
                <input type="hidden" name="_UserForm_ErrorConfirmPassword">
                  <xsl:attribute name="value">
                    <xsl:value-of select="errorMsgConfirmPassword/text()" />
                  </xsl:attribute>
                </input>
              </td>
            </tr>
            <tr>
              <td colspan="2">
                <input type="hidden" name="_UserForm_ErrorLoginExist">
                  <xsl:attribute name="value">
                    <xsl:value-of select="errorMsgLoginExist/text()" />
                  </xsl:attribute>
                </input>
              </td>
            </tr>
            <tr>
              <td colspan="2">
                <img src="{$applicationPath}Images/Transp.gif" height="5" width="1" />
              </td>
            </tr>
          </table>
        </span>
      </xsl:when>
    </xsl:choose>
  </xsl:template>


  <xsl:template match="form-userelementName">
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:variable name="isReadOnly" select="CM:ContaintStep(concat($readonlyParent, ',', string(./readonly/text())), string($currentStep))" />
    <td valign="top" style="padding-right:5px;" align="left">
      <xsl:apply-templates select="label">
        <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
      </xsl:apply-templates>
    </td>
    <td valign="top" width="100%" align="left">
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <input type="text" disabled="true" class="forminput" size="30" />
        </xsl:when>
        <xsl:otherwise>
          <input type="text" class="forminput" size="30">
            <!--<xsl:if test="$isReadOnly = 'true'">
							<xsl:attribute name="disabled">true</xsl:attribute>
						</xsl:if>-->
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputForm">
                <xsl:with-param name="name">_UserForm_UserLogin</xsl:with-param>
                <xsl:with-param name="label">_UserForm_UserLogin</xsl:with-param>
                <xsl:with-param name="pos">1</xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:attribute name="value">
              <xsl:choose>
                <xsl:when test="$formValues">
                  <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                  <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                </xsl:when>
                <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
            </xsl:attribute>
            <xsl:if test="$formValues and string-length($formValues) != 0">
              <xsl:attribute name="disabled">
                <xsl:text>disabled</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
          </input>
          <xsl:if test="$formValues and string-length($formValues) != 0">
            <input type="hidden" name="_UserForm_UserModify" class="forminput" size="30" value="UserModify" />
          </xsl:if>
        </xsl:otherwise>
      </xsl:choose>
    </td>
  </xsl:template>

  <xsl:template match="form-userelementEmail">
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:variable name="isReadOnly" select="CM:ContaintStep(concat($readonlyParent, ',', string(./readonly/text())), string($currentStep))" />
    <td valign="top" style="padding-right:5px;" align="left">
      <xsl:apply-templates select="label">
        <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
      </xsl:apply-templates>
    </td>
    <td valign="top" width="100%" align="left">
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <input type="text" disabled="true" class="forminput" size="30" />
        </xsl:when>
        <xsl:otherwise>
          <input type="text" class="forminput" size="30">
            <xsl:if test="$isReadOnly = 'true'">
              <xsl:attribute name="disabled">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputForm">
                <xsl:with-param name="name">_UserForm_Email</xsl:with-param>
                <xsl:with-param name="label">_UserForm_Email</xsl:with-param>
                <xsl:with-param name="pos">1</xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:attribute name="value">
              <xsl:choose>
                <xsl:when test="$formValues">
                  <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                  <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                </xsl:when>
                <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
            </xsl:attribute>
            <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
            <xsl:variable name="tmp4" select="CM:AddFormRegExpElement(CM:GetTextFieldName(),'[a-zA-Z0-9_\\-.]+@[a-zA-Z0-9_\\-.]{2,}.[a-zA-Z]{2,3}')" />
          </input>
        </xsl:otherwise>
      </xsl:choose>
    </td>
  </xsl:template>

  <xsl:template match="form-userelementPassword">
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:variable name="isReadOnly" select="CM:ContaintStep(concat($readonlyParent, ',', string(./readonly/text())), string($currentStep))" />
    <td valign="top" style="padding-right:5px;" align="left">
      <xsl:apply-templates select="label">
        <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
      </xsl:apply-templates>
    </td>
    <td valign="top" width="100%" align="left">
      
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <input type="password" disabled="true" class="forminput" size="30" />
        </xsl:when>
        <xsl:otherwise>
          <input type="password" class="forminput" size="30">
            <xsl:if test="$isReadOnly = 'true'">
              <xsl:attribute name="disabled">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputForm">
                <xsl:with-param name="name">_UserForm_Password</xsl:with-param>
                <xsl:with-param name="label">_UserForm_Password</xsl:with-param>
                <xsl:with-param name="pos">1</xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:attribute name="value">
              <xsl:choose>
                <xsl:when test="$formValues">
                  <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                  <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                </xsl:when>
                <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
            </xsl:attribute>
            <xsl:if test="$formValues and string-length($formValues) != 0">
              <xsl:attribute name="disabled">
                <xsl:text>disabled</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
          </input>
        </xsl:otherwise>
      </xsl:choose>
    </td>
  </xsl:template>

  <xsl:template match="form-userelementConfirmPassword">
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:variable name="isReadOnly" select="CM:ContaintStep(concat($readonlyParent, ',', string(./readonly/text())), string($currentStep))" />
    <td valign="top" style="padding-right:5px;" align="left">
      <xsl:apply-templates select="label">
        <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
      </xsl:apply-templates>
    </td>
    <td valign="top" width="100%" align="left">
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'true'">
          <input type="password" disabled="true" class="forminput" size="30" />
        </xsl:when>
        <xsl:otherwise>
          <input type="password" class="forminput" size="30">
            <xsl:if test="$isReadOnly = 'true'">
              <xsl:attribute name="disabled">
                <xsl:text>true</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:attribute name="name">
              <xsl:call-template name="NameInputForm">
                <xsl:with-param name="name">_UserForm_ConfirmPassword</xsl:with-param>
                <xsl:with-param name="label">_UserForm_ConfirmPassword</xsl:with-param>
                <xsl:with-param name="pos">1</xsl:with-param>
              </xsl:call-template>
            </xsl:attribute>
            <xsl:attribute name="value">
              <xsl:choose>
                <xsl:when test="$formValues">
                  <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                  <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                </xsl:when>
                <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
            </xsl:attribute>
            <xsl:if test="$formValues and string-length($formValues) != 0">
              <xsl:attribute name="disabled">
                <xsl:text>disabled</xsl:text>
              </xsl:attribute>
            </xsl:if>
            <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
          </input>
        </xsl:otherwise>
      </xsl:choose>
    </td>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CAPTCHA xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="form-captchaelement">
    <xsl:param name="readonlyParent"></xsl:param>
    <xsl:param name="form-labelwidth"></xsl:param>
    <xsl:variable name="isVisibleStep" select="CM:ContaintStep(string(./step/text()), string($currentStep))" />
    <xsl:variable name="isReadOnly" select="CM:ContaintStep(concat($readonlyParent, ',', string(./readonly/text())), string($currentStep))" />
    <xsl:choose>
      <xsl:when test="$xe:editionMode = 'true' and count(//form-stepelement) &gt; 1">
        <fieldset style="padding:5px;">
          <legend class="formtext">
            <xsl:choose>
              <xsl:when test="./step/text() != ''">
                <xsl:value-of select="./step/text()" />
              </xsl:when>
              <xsl:otherwise>*</xsl:otherwise>
            </xsl:choose>
          </legend>
          <span style="padding:4px">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <xsl:call-template name="XmlEditorInfo" />
              <tr>
                <td valign="top" style="padding-right:5px;" align="left">
                  <xsl:apply-templates select="label">
                    <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                  </xsl:apply-templates>
                </td>
                <td valign="top" width="100%" align="left">
                  <xsl:choose>
                    <xsl:when test="$xe:editionMode = 'true'">
                      <input type="text" disabled="true" class="forminput" size="30" />
                    </xsl:when>
                    <xsl:otherwise>
                      <input type="text" class="forminput" size="30">
                        <!--<xsl:if test="$isReadOnly = 'true'">
													<xsl:attribute name="disabled">true</xsl:attribute>
												</xsl:if>-->
                        <xsl:attribute name="name">
                          <xsl:call-template name="NameInputForm">
                            <xsl:with-param name="name">_UserForm_Captcha</xsl:with-param>
                            <xsl:with-param name="label">_UserForm_Captcha</xsl:with-param>
                            <xsl:with-param name="pos">1</xsl:with-param>
                          </xsl:call-template>
                        </xsl:attribute>
                        <xsl:attribute name="value">
                          <xsl:choose>
                            <xsl:when test="$formValues">
                              <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                              <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                            </xsl:when>
                            <xsl:otherwise></xsl:otherwise>
                          </xsl:choose>
                        </xsl:attribute>
                        <xsl:if test="$formValues and string-length($formValues) != 0">
                          <xsl:attribute name="readonly">true</xsl:attribute>
                        </xsl:if>
                        <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
                      </input>
                      <!--<xsl:if test="$formValues and string-length($formValues) != 0">
												<input type="hidden" name="_UserForm_UserModify" class="forminput" size="30" value="UserModify" />
											</xsl:if>-->
                    </xsl:otherwise>
                  </xsl:choose>
                </td>
              </tr>
              <tr>
                <td></td>
                <td>
                  <xsl:if test="$xe:editionMode = 'false'">
                    <img id="captcha_img" src="{$applicationPath}_SiteNote/WWW/GetCaptcha.aspx" border='0' />
                    <script>
                      $(document).ready(function() {
                      var prev = $('#captcha_img').attr('src');
                      $('#captcha_img').attr('src', prev + '?reload=' + Math.random());
                      });
                    </script>
                  </xsl:if>
                </td>
              </tr>
            </table>
          </span>
        </fieldset>
      </xsl:when>
      <!--<xsl:when test="$xe:editionMode = 'true' or $steplower = '' or $steplower = $currentStep">-->
      <xsl:when test="$xe:editionMode = 'true' or $isVisibleStep = '' or $isVisibleStep = 'true'">
        <span style="padding:4px">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <xsl:call-template name="XmlEditorInfo" />
            <tr>
              <td valign="top" style="padding-right:5px;" align="left">
                <xsl:apply-templates select="label">
                  <xsl:with-param name="form-labelwidth" select="$form-labelwidth" />
                </xsl:apply-templates>
              </td>
              <td valign="top" width="100%" align="left">
                <xsl:choose>
                  <xsl:when test="$xe:editionMode = 'true'">
                    <input type="text" disabled="true" class="forminput" size="30" />
                  </xsl:when>
                  <xsl:otherwise>
                    <input type="text" class="forminput" size="30">
                      <!--<xsl:if test="$isReadOnly = 'true'">
													<xsl:attribute name="disabled">true</xsl:attribute>
												</xsl:if>-->
                      <xsl:attribute name="name">
                        <xsl:call-template name="NameInputForm">
                          <xsl:with-param name="name">_UserForm_Captcha</xsl:with-param>
                          <xsl:with-param name="label">_UserForm_Captcha</xsl:with-param>
                          <xsl:with-param name="pos">1</xsl:with-param>
                        </xsl:call-template>
                      </xsl:attribute>
                      <xsl:attribute name="value">
                        <xsl:choose>
                          <xsl:when test="$formValues">
                            <xsl:variable name="tmp2" select="CM:GetTextFieldName()"/>
                            <xsl:value-of select="CM:GetValue($tmp2, $formValues)"/>
                          </xsl:when>
                          <xsl:otherwise></xsl:otherwise>
                        </xsl:choose>
                      </xsl:attribute>
                      <xsl:if test="$formValues and string-length($formValues) != 0">
                        <xsl:attribute name="readonly">
                          <xsl:text>true</xsl:text>
                        </xsl:attribute>
                      </xsl:if>
                      <xsl:variable name="tmp3" select="CM:AddFormMandatoryElement(CM:GetTextFieldName())"/>
                    </input>
                    <!--<xsl:if test="$formValues and string-length($formValues) != 0">
												<input type="hidden" name="_UserForm_UserModify" class="forminput" size="30" value="UserModify" />
											</xsl:if>-->
                  </xsl:otherwise>
                </xsl:choose>
              </td>
            </tr>
            <tr>
              <td></td>
              <td>
                <xsl:if test="$xe:editionMode = 'false'">
                  <img id="captcha_img" src="{$applicationPath}_SiteNote/WWW/GetCaptcha.aspx" border='0' />
                  <script>
                    $(document).ready(function() {
                    var prev = $('#captcha_img').attr('src');
                    $('#captcha_img').attr('src', prev + '?reload=' + Math.random());
                    });
                  </script>
                </xsl:if>
              </td>
            </tr>
          </table>
        </span>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx XXXX xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <!-- ******************************* AUTOREPLY ***************************************-->

  <xsl:template match="AutoReplycontent">
    <div class="autoReplyContent">
      <xsl:call-template name="XmlEditorInfo" />
      <xsl:choose>
        <xsl:when test="$xe:editionMode = 'false'">
          <xsl:attribute name="style">
            <xsl:text>display:none !important;</xsl:text>
          </xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="style">
            <xsl:text>display:block !important;</xsl:text>
          </xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>

      <xsl:if test="$xe:editionMode = 'true'">
        <div>
          <img src="{$applicationPath}Images/Transp.gif" width="250px" height="3px" />
        </div>
      </xsl:if>
      <xsl:apply-templates select="section|spacer|horizontalline"/>
      <xsl:if test="$xe:editionMode = 'false'">
        <xsl:call-template name="ServerControlAutoReply">
          <xsl:with-param name="mailSender" select="mailSender/text()"/>
          <xsl:with-param name="mailSubject" select="mailSubject/text()"/>
        </xsl:call-template>
      </xsl:if>
      <div style="clear:both;height:1px;">
        <img src="{$applicationPath}Images/Transp.gif" width="1px" height="1px" style="display:none;" />
      </div>
    </div>
  </xsl:template>

  <xsl:template name="ServerControlAutoReply">
    <xsl:param name="mailSender"/>
    <xsl:param name="mailSubject"/>
    <xsl:call-template name="XmlEditorStartServerControlBlock"/>
    <type>CrossFactory.SiteNote.Controls.AutoReply, CrossFactory.SiteNote3_0</type>
    <property>
      <name>MailSender</name>
      <value>
        <xsl:value-of select="$mailSender"/>
      </value>
    </property>
    <property>
      <name>MailSubject</name>
      <value>
        <xsl:value-of select="$mailSubject"/>
      </value>
    </property>
    <xsl:call-template name="XmlEditorEndServerControlBlock"/>
  </xsl:template>

  <!-- ******************************* /AUTOREPLY ***************************************-->


  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="checked"></xsl:template>

  <!-- /form -->
  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="rulestyle"></xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="alignment"></xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="tabulation"></xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="openin"></xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="spacing"></xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <xsl:template match="colored/text()"></xsl:template>

  <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

  <msxsl:script language="JScript" implements-prefix="CM">

    var formElementsName = "";
    var formMandatoryElement = "";
    var formRegExpElement = "";
    var firstStepelt = "";
    var counter = 0;
    var counterStep = 0;

    function GetCounter()
    {
    return counter++;
    }
    function GetCounterStep()
    {
    return counterStep++;
    }

    function RandomId()
    {
    return Math.random()*5;
    }
    function FirstStep()
    {
    if(firstStepelt != '')
    {
    return 'false';
    }
    firstStepelt = 'ok';
    return 'true';
    }

    function ReplaceQuote(eltName)
    {
    return eltName.ToString().replace(/\'/g," ").replace(/\"/g," ");
    }

    function AddFormElementName(eltName)
    {
    var tmp;

    tmp = '';
    try
    {
    tmp = eltName.ToString();
    }
    catch(e)
    {
    tmp = '';
    }

    if(tmp == '')
    {
    if (eltName.MoveNext())
    {
    tmp = eltName.Current.Value;
    }
    }

    if(formElementsName != "")
    {
    if(tmp != "")
    {
    formElementsName += "|";
    }
    }
    formElementsName += tmp;
    return ''+tmp;
    }
    function GetAllFormElementsNames()
    {
    return ''+formElementsName;

    }
    function AddFormMandatoryElement(eltName)
    {
    var tmp;

    tmp = '';
    try
    {
    tmp = eltName.ToString();
    }
    catch(e)
    {
    tmp = '';
    }

    if(tmp == '')
    {
    if (eltName.MoveNext())
    {
    tmp = eltName.Current.Value;
    }
    }

    if(formMandatoryElement != "")
    {
    if(tmp != "")
    {
    formMandatoryElement += "|";
    }
    }
    formMandatoryElement += tmp;
    return ''+tmp;
    }

    function GetAllFormMandatoryElement()
    {
    return ''+formMandatoryElement;
    }
    function AddFormRegExpElement(eltName,expression)
    {
    var tmp;
    tmp = '';
    try
    {
    tmp = eltName.ToString();
    }
    catch(e)
    {
    tmp = '';
    }

    if(tmp == '')
    {
    if (eltName.MoveNext())
    {
    tmp = eltName.Current.Value;
    }
    }

    if(formRegExpElement != "")
    {
    if(tmp != "")
    {
    formRegExpElement += "$";
    }
    }
    formRegExpElement += tmp +"!"+expression.ToString();
    return ''+tmp;
    }
    function GetAllFormRegExpElement()
    {
    return ''+formRegExpElement;
    }
    function GetValue(name, xmlFormValues)
    {
    var node;
    var nameValue;

    if(xmlFormValues.MoveNext())
    {
    node = xmlFormValues.Current.Select("//formElement[name = '" + name + "']");

    if (node.Count &gt; 0)
    {
    node.MoveNext();

    nameValue = node.Current.Select("value");
    nameValue.MoveNext();

    return ''+nameValue.Current.Value;
    }
    else
    {
    return '';
    }
    }
    else
    {
    return '';
    }
    }
    var textFieldName="";
    function SetTextFieldName(name)
    {
    textFieldName = name;
    }
    function GetTextFieldName()
    {
    return ''+textFieldName;
    }

    function EscapeCommand(command)
    {
    var cmd;
    var commandValue;
    var tmp;

    tmp = '';
    try
    {
    tmp = command.ToString();
    }
    catch(e)
    {
    tmp = '';
    }

    cmd = '';
    if (tmp == '')
    {
    if (command.length > 0)
    {
    commandValue = command.item(0);

    if (commandValue.text != "")
    {


    /*
    cmd = new String(commandValue.text).replace(/\\/g, "\\");


    cmd = cmd.Replace(/\'/g, "'");*/
    }
    }
    }
    else
    {
    if (command.MoveNext())
    {
    commandValue = command.Current.Value;

    cmd = new String(commandValue).replace(/\\/g, "\\");
    cmd = cmd.Replace(/\'/g, "'");
    }
    }

    return ''+cmd;
    }

    function ContaintStep(stringStep, stringCurrentStep)
    {
    if (stringCurrentStep == '')
    {
    return 'true';
    }
    if (stringStep == '')
    {
    return 'true';
    }
    if (stringStep == '*')
    {
    return 'true';
    }
    for(var tmp in stringStep.split(','))
    {
    if (stringStep.split(',')[tmp].toLowerCase() == stringCurrentStep.toLowerCase())
    return 'true';
    }
    return 'false';
    }

    function GetUrl(applicationPath, language, hierarchy, url)
    {
    var urlValue;
    var node;
    var realUrl;
    var name;
    var tmp;

    tmp = '';
    try
    {
    tmp = url.ToString();
    }
    catch(e)
    {
    tmp = '';
    }

    if (tmp == '')
    {
    if (url.length > 0)
    {
    urlValue = url.item(0);

    if (urlValue.text != "")
    {
    if (urlValue.text.toLowerCase().substr(0,3) == "cm:")
    {
    if (urlValue.text.toLowerCase().substr(3,applicationPath.length) == applicationPath)
    {
    return ''+urlValue.text.substr(3);
    }
    else
    {
    return ''+applicationPath + urlValue.text.substr(4);
    }
    }
    else
    {
    if (urlValue.text.toLowerCase().substr(0,5) == "file:")
    {
    realUrl = urlValue.text.substr(5);
    return '' + realUrl;
    }
    else
    {
    if (urlValue.text.toLowerCase().substr(0,3) == "www")
    {
    return 'http://'+urlValue.text;
    }
    else
    {
    return ''+urlValue.text;
    }
    }
    }
    }
    else
    {
    return '';
    }
    }
    else
    {
    return '';
    }
    }
    else
    {
    if (url.MoveNext())
    {
    urlValue = url.Current.Value;

    if (urlValue.toLowerCase().substr(0,3) == "cm:")
    {
    if (urlValue.toLowerCase().substr(3,applicationPath.length) == applicationPath)
    {
    return ''+urlValue.substr(3);
    }
    else
    {
    return ''+applicationPath + urlValue.substr(4);
    }
    }
    else
    {
    if (urlValue.toLowerCase().substr(0,5) == "file:")
    {
    realUrl = urlValue.substr(5);
    return ''+ realUrl;
    }
    else
    {
    if (urlValue.toLowerCase().substr(0,3) == "www")
    {
    return 'http://'+urlValue;
    }
    else
    {
    return ''+urlValue;
    }

    }
    }
    }
    }

    return '';
    }

  </msxsl:script>

</xsl:stylesheet>









